Re: [PATCH] Re: [2.6.20] BUG: workqueue leaked lock

Oleg Nesterov
2007-03-21T15:25:30Z

On 03/21, Jarek Poplawski wrote:
>
> > Sorry, I can't understand you. lockdep_depth is counted within a process,
> > which starts before f(), yes. This process is cwq->thread, it was forked
> > during create_workqueue(). It does not take any locks directly, only by
> > calling work->func(). laundry_wq doesn't differ from keventd_wq or any other
> > wq in this sense. nfsd does not "runs kthread by itself", it inserts the
> > work and wakes up cwq->thread.
>
> I think we know how it all should start and go. If only analyzing
> the code could be enough, this current check of lockdep_depth()
> is unnecessary too, because laundromat_code code looks as good
> as run_workqueue code. I send it for testing and I mean it -
> something strange is going here, so some checks should be added
> - I didn't say mine is the right and will certainly help.

Ah, sorry, I misunderstood you. I had (my fault) a false impression
that you propose this patch as a "fix", while we seem to agree that
the real source of this problem remains unknown.

> So, if
> you have another idea for looking after it, let us know.

No, I don't.

Oleg.