john cooper wrote:
>
> rpc_delete_timer(struct rpc_task *task)
> {
> - if (test_and_clear_bit(RPC_TASK_HAS_TIMER, &task->tk_runstate)) {
> + if (task->tk_timer.base) {
> del_singleshot_timer_sync(&task->tk_timer);
> dprintk("RPC: %4d deleting timer\n", task->tk_pid);
> }
I know nothing about rpc, but this looks completely wrong to me.
Please don't use the ->base directly, use timer_pending(). This
field is never NULL in -mm tree.
Next, timer_pending() == 0 does not mean that del_timer_sync() is
not needed, it may be running on the other CPU.
Looking at the code for the first time, I can guess that RPC_TASK_HAS_TIMER
was invented to indicate when it is safe not to wait for timer
completition. This bit is cleared after ->tk_timeout_fn call in
the timer's handler. After that rpc_run_timer will not touch *task.
Oleg.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]