mirror of
https://github.com/torvalds/linux.git
synced 2025-11-04 18:49:34 +02:00
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: dcbeaa68db ("nfsd4: allow backchannel recovery")
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
parent
da4f777e62
commit
1e02c641c3
1 changed files with 2 additions and 0 deletions
|
|
@ -1464,6 +1464,8 @@ static void nfsd4_process_cb_update(struct nfsd4_callback *cb)
|
||||||
ses = c->cn_session;
|
ses = c->cn_session;
|
||||||
}
|
}
|
||||||
spin_unlock(&clp->cl_lock);
|
spin_unlock(&clp->cl_lock);
|
||||||
|
if (!c)
|
||||||
|
return;
|
||||||
|
|
||||||
err = setup_callback_client(clp, &conn, ses);
|
err = setup_callback_client(clp, &conn, ses);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue