]> 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>
Sun, 20 Apr 2025 08:15:51 +0000 (10:15 +0200)
commite0717385f5c51e290c2cd2ad4699a778316b5132
treef932f31abf1d6d58f08ed67fcb28d4b50a119294
parent2eb6e5e0944c7cbdff862bb80d87f3de41d70c5a
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