Commit 24b6f31e authored by Andrew Morton's avatar Andrew Morton Committed by James Bottomley

[PATCH] rpc_delete_timer race fix

Patch from Ulrich Weigand <weigand@immd1.informatik.uni-erlangen.de>

Fix a race wherein timer_pending() returns false, but the timer handler is
actually running on another CPU.  We need to call del_timer_sync()
regardless, so we wait for completion of the handler.
parent 4398ab46
......@@ -158,10 +158,8 @@ void rpc_add_timer(struct rpc_task *task, rpc_action timer)
static inline void
rpc_delete_timer(struct rpc_task *task)
{
if (timer_pending(&task->tk_timer)) {
if (del_timer_sync(&task->tk_timer))
dprintk("RPC: %4d deleting timer\n", task->tk_pid);
del_timer_sync(&task->tk_timer);
}
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment