Skip to content

Commit

Permalink
nfsd: Fix an Oops in free_session()
Browse files Browse the repository at this point in the history
In call_xpt_users(), we delete the entry from the list, but we
do not reinitialise it. This triggers the list poisoning when
we later call unregister_xpt_user() in nfsd4_del_conns().

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
Trond Myklebust authored and J. Bruce Fields committed Oct 29, 2018
1 parent bd8d725 commit bb6ad55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sunrpc/svc_xprt.c
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ static void call_xpt_users(struct svc_xprt *xprt)
spin_lock(&xprt->xpt_lock);
while (!list_empty(&xprt->xpt_users)) {
u = list_first_entry(&xprt->xpt_users, struct svc_xpt_user, list);
list_del(&u->list);
list_del_init(&u->list);
u->callback(u);
}
spin_unlock(&xprt->xpt_lock);
Expand Down

0 comments on commit bb6ad55

Please sign in to comment.