]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cifs: avoid NULL pointer dereference in dbg call
authorAlexandra Diupina <adiupina@astralinux.ru>
Wed, 19 Mar 2025 14:28:58 +0000 (17:28 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 08:45:32 +0000 (10:45 +0200)
commit864ba5c651b03830f36f0906c21af05b15c1aaa6
tree2b2962824602aa361f139365e874ea3811a29599
parentf75eb9acf9dfd8f4961947b8c30980985368dd58
cifs: avoid NULL pointer dereference in dbg call

commit b4885bd5935bb26f0a414ad55679a372e53f9b9b upstream.

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: e79b0332ae06 ("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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/smb/client/smb2misc.c