mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-23 07:23:12 +02:00
cifs: avoid NULL pointer dereference in dbg call
[ Upstream commitb4885bd593
] cifs_server_dbg() implies server to be non-NULL so move call under condition to avoid NULL pointer dereference. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes:e79b0332ae
("cifs: ignore cached share root handle closing errors") Cc: stable@vger.kernel.org Signed-off-by: Alexandra Diupina <adiupina@astralinux.ru> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
cad91c15b8
commit
ba3ce6c60c
|
@ -809,11 +809,12 @@ smb2_handle_cancelled_close(struct cifs_tcon *tcon, __u64 persistent_fid,
|
|||
WARN_ONCE(tcon->tc_count < 0, "tcon refcount is negative");
|
||||
spin_unlock(&cifs_tcp_ses_lock);
|
||||
|
||||
if (tcon->ses)
|
||||
if (tcon->ses) {
|
||||
server = tcon->ses->server;
|
||||
|
||||
cifs_server_dbg(FYI, "tid=0x%x: tcon is closing, skipping async close retry of fid %llu %llu\n",
|
||||
tcon->tid, persistent_fid, volatile_fid);
|
||||
cifs_server_dbg(FYI,
|
||||
"tid=0x%x: tcon is closing, skipping async close retry of fid %llu %llu\n",
|
||||
tcon->tid, persistent_fid, volatile_fid);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user