]> 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:18:19 +0000 (10:18 +0200)
commit20048e658652e731f5cadf4a695925e570ca0ff9
treea11408dddc61abdcd84def89672b8ae69d205081
parent2c4634427729be9a7cb662662b2a1e9b82ad1f79
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