Re: Need lockdep help

From: Ingo Molnar
Date: Tue Dec 04 2007 - 16:00:47 EST



* Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:

> > I'm not sure I can understand your plan, but I doubt there should be
> > such problems with taking rwsem for sleeping, so maybe it would be
> > better to figure out what really scares lockdep, to fix the right
> > place?
>
> The real problem is that lockdep has to make some generalizations. It
> can't be aware of the details of every possible situation, and it
> doesn't have a global view of the entire kernel, so it doesn't know
> when special circumstances make deadlock impossible.
>
> Furthermore, in this case deadlock isn't really impossible -- it could
> occur if there were a bug somewhere else in the kernel. So lockdep
> was correct to warn that deadlock might occur.

ok. Thanks for resolving this by working it around - i _think_ in the
long run we'd like to make all locking "simpler" - not just for the sake
of lockdep, but also for the sake of human reviewability. So in that
sense, even though in this particular case you are fully right that
lockdep was wrong, we benefit long-term.

Ingo
--
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/