Skip to content

Commit

Permalink
SUNRPC: prevent task_cleanup running on freed xprt
Browse files Browse the repository at this point in the history
We saw a report of a NULL dereference in xprt_autoclose:

	https://bugzilla.redhat.com/show_bug.cgi?id=611938

This appears to be the result of an xprt's task_cleanup running after
the xprt is destroyed.  Nothing in the current code appears to prevent
that.

Signed-off-by: J. Bruce Fields <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
  • Loading branch information
J. Bruce Fields authored and Trond Myklebust committed Aug 4, 2010
1 parent d6a1ed0 commit c3ae62a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/sunrpc/xprt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1131,6 +1131,7 @@ static void xprt_destroy(struct kref *kref)
rpc_destroy_wait_queue(&xprt->sending);
rpc_destroy_wait_queue(&xprt->resend);
rpc_destroy_wait_queue(&xprt->backlog);
cancel_work_sync(&xprt->task_cleanup);
/*
* Tear down transport state and free the rpc_xprt
*/
Expand Down

0 comments on commit c3ae62a

Please sign in to comment.