Re: [tip:core/ipi] generic-ipi: eliminate spurious pointlessWARN_ON()s

From: Eric W. Biederman
Date: Fri Mar 20 2009 - 19:42:12 EST


Peter Zijlstra <peterz@xxxxxxxxxxxxx> writes:

> On Fri, 2009-03-20 at 19:24 +0100, Ingo Molnar wrote:
>> * Eric W. Biederman <ebiederm@xxxxxxxxxxxx> wrote:
>>
>> > Now back to my regularly scheduled hotunplug challenges starting
>> > with getting lockdep to warn about the dead locks.
>
> http://programming.kicks-ass.net/kernel-patches/cpu-hotplug/
>
> The recursive read code needs more work..

Cpu hotunplug isn't quite where I am looking at.

Normal device hotunplug, and in particular the use counts sysctl,
proc, and sysfs that act as reader locks that we eventually wait for
when it comes time to free those structures.

I think they fit the same model as reader/writer locks where the
readers can recurse but the writers can not. Which seems to be
the model of rcu locks as well.

It doesn't look like read==2 works properly because it does not log any
locks grabbed underneath the reader lock. Is that deliberate? It certainly
does not seem to be correct.

The deadlock I am worried about is:
rtnl_lock() inc_use_count();
wait use_count == 0. rtnl_lock();

Which you I have seen several people hit in the last couple of weeks.

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