Skip to content

Commit 1e02c64

Browse files
committed
NFSD: Prevent NULL dereference in nfsd4_process_cb_update()
@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 <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent da4f777 commit 1e02c64

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/nfsd/nfs4callback.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,6 +1464,8 @@ static void nfsd4_process_cb_update(struct nfsd4_callback *cb)
14641464
ses = c->cn_session;
14651465
}
14661466
spin_unlock(&clp->cl_lock);
1467+
if (!c)
1468+
return;
14671469

14681470
err = setup_callback_client(clp, &conn, ses);
14691471
if (err) {

0 commit comments

Comments
 (0)