SUNRPC: prevent task_cleanup running on freed xprt
[cascardo/linux.git] / net / sunrpc / xprt.c
index 7029783..970fb00 100644 (file)
@@ -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
         */