mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
SUNRPC: prevent task_cleanup running on freed xprt
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 <bfields@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
d6a1ed08c6
commit
c3ae62ae08
1 changed files with 1 additions and 0 deletions
|
@ -1131,6 +1131,7 @@ static void xprt_destroy(struct kref *kref)
|
||||||
rpc_destroy_wait_queue(&xprt->sending);
|
rpc_destroy_wait_queue(&xprt->sending);
|
||||||
rpc_destroy_wait_queue(&xprt->resend);
|
rpc_destroy_wait_queue(&xprt->resend);
|
||||||
rpc_destroy_wait_queue(&xprt->backlog);
|
rpc_destroy_wait_queue(&xprt->backlog);
|
||||||
|
cancel_work_sync(&xprt->task_cleanup);
|
||||||
/*
|
/*
|
||||||
* Tear down transport state and free the rpc_xprt
|
* Tear down transport state and free the rpc_xprt
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue