NFSD: Prevent NULL dereference in nfsd4_process_cb_update()
[ Upstream commit1e02c641c3] @ses is initialized to NULL. If __nfsd4_find_backchannel() finds no available backchannel session, setup_callback_client() will try to dereference @ses and segfault. Fixes:dcbeaa68db("nfsd4: allow backchannel recovery") Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
68c3b7cdef
commit
cac1405e3f
@@ -1229,6 +1229,8 @@ static void nfsd4_process_cb_update(struct nfsd4_callback *cb)
|
||||
ses = c->cn_session;
|
||||
}
|
||||
spin_unlock(&clp->cl_lock);
|
||||
if (!c)
|
||||
return;
|
||||
|
||||
err = setup_callback_client(clp, &conn, ses);
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user