lkml.org 
[lkml]   [2007]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/6] workqueue: make cancel_rearming_delayed_workqueue() work on idle dwork
On 02/07, Daniel Drake wrote:
>
> Oleg Nesterov wrote:
> >cancel_rearming_delayed_workqueue(dwork) will hang forever if dwork was not
> >scheduled, because in that case cancel_delayed_work()->del_timer_sync()
> >never
> >returns true.
>
> Thanks! We hit this problem before with the zd1211rw driver and avoided
> using cancel_rearming_delayed_workqueue() for this reason.

Great. But I am afraid my changelog was incomplete. This patch only fixes
the cancel_rearming_delayed_workqueue(freshly_initialized_dwork) lockup.

The following code

schedule_delayed_work(dw);
cancel_rearming_delayed_workqueue(dw); // OK
cancel_rearming_delayed_workqueue(dw); // HANGS!

still doesn't work.

Is it worth fixing? The fix is very simple, and probably makes sense by
itself:

cancel_delayed_work:

- work_release(&work->work);
+ work->work.data = NULL;

Oleg.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-02-07 16:17    [W:0.089 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site