]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfsd: restore callback functionality for NFSv4.0
authorNeilBrown <neilb@suse.de>
Fri, 20 Dec 2024 04:28:18 +0000 (15:28 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2025 12:28:37 +0000 (13:28 +0100)
commit804d55e92b7ac04c25108d7175647ed27a6a05d5
tree7d23c208f584f525b7df8f83f1058ddb0e9fcdb6
parente2373eea347e80485f69b66e43eeefde2dcaa66d
nfsd: restore callback functionality for NFSv4.0

[ Upstream commit 7917f01a286ce01e9c085e24468421f596ee1a0c ]

A recent patch inadvertently broke callbacks for NFSv4.0.

In the 4.0 case we do not expect a session to be found but still need to
call setup_callback_client() which will not try to dereference it.

This patch moves the check for failure to find a session into the 4.1+
branch of setup_callback_client()

Fixes: 1e02c641c3a4 ("NFSD: Prevent NULL dereference in nfsd4_process_cb_update()")
Signed-off-by: NeilBrown <neilb@suse.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/nfs4callback.c