]> 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, 2 May 2025 05:44:27 +0000 (07:44 +0200)
commit9c9000cb91b986eb7f75835340c67857ab97c09b
tree3db118e6cd9e1f24910e7dd1ec2a43fab6d416ea
parent0f552a0a33db7cb97c176d652500c22ced50ab15
cifs: avoid NULL pointer dereference in dbg call

[ Upstream commit b4885bd5935bb26f0a414ad55679a372e53f9b9b ]

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: Sasha Levin <sashal@kernel.org>
fs/cifs/smb2misc.c