Skip to content
/ linux Public
forked from torvalds/linux

Commit

Permalink
NFSD: Prevent NULL dereference in nfsd4_process_cb_update()
Browse files Browse the repository at this point in the history
@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: dcbeaa6 ("nfsd4: allow backchannel recovery")
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
  • Loading branch information
chucklever committed Nov 19, 2024
1 parent da4f777 commit 1e02c64
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/nfsd/nfs4callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -1464,6 +1464,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) {
Expand Down

0 comments on commit 1e02c64

Please sign in to comment.