Commit a13dbc5e authored by Zhen Ni's avatar Zhen Ni Committed by Greg Kroah-Hartman
Browse files

afs: Fix potential null pointer dereference in afs_put_server



commit 9158c6bb upstream.

afs_put_server() accessed server->debug_id before the NULL check, which
could lead to a null pointer dereference. Move the debug_id assignment,
ensuring we never dereference a NULL server pointer.

Fixes: 2757a4dc ("afs: Fix access after dec in put functions")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarZhen Ni <zhen.ni@easystack.cn>
Acked-by: default avatarDavid Howells <dhowells@redhat.com>
Reviewed-by: default avatarJeffrey Altman <jaltman@auristor.com>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aae51495
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment