lkml.org 
[lkml]   [2012]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: lockdep trace from posix timers
    From
    Date
    On Mon, 2012-08-20 at 17:10 +0200, Peter Zijlstra wrote:
    > On Mon, 2012-08-20 at 16:59 +0200, Oleg Nesterov wrote:
    > > On 08/20, Peter Zijlstra wrote:
    > > >
    > > > task_work_cancel(struct task_struct *task, task_work_func_t func)
    > > > {
    > > > ...
    > > > +
    > > > +again:
    > > > + workp = &task->task_works;
    > > > + work = *workp;
    > > > + while (work) {
    > > > + if (work->func == func) {
    > >
    > > But this all can race with task_work_run() if task != current.
    > >
    > > This "work" can be freed/reused. And it should only return !NULL
    > > if twork->func() was not called.
    >
    > Ah, because we could be iterating the list after the xchg done by run.

    I guess we could steal the entire list and requeue it afterwards and
    lift TIF_NOTIFY_RESUME along with it.. but I can't say that's pretty.






    \
     
     \ /
      Last update: 2012-08-20 18:01    [from the cache]
    ©2003-2014 Jasper Spaans. Advertise on this site