Re: 2.6.24-rc7 lockdep warning when poweroff

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Peter Zijlstra <peterz@...>
Cc: Dave Young <hidave.darkstar@...>, Linus Torvalds <torvalds@...>, Linux Kernel Mailing List <linux-kernel@...>, Ingo Molnar <mingo@...>, Oleg Nesterov <oleg@...>
Date: Tuesday, January 15, 2008 - 8:39 am

> > To make sure now:

True, but I don't see a good way to avoid that. Similar things also
happen with

	mutex_init(&priv->mtx);

for example, no?

e

Right.

r

Except, how could I do that though? Keys are required to be static, so I
can't have the object as the key. In any case, I don't think it matters
much because the workqueues are per-hardware but all have similar users,
I think that the other users here probably behave similarly.

t

It doesn't seem to have so far ;) I don't think it should. If some code
allocates a per-instance workqueue that's much like having an inode lock
or so.

The scenario to get into trouble with this would require having a
per-instance lock and a per-instance workqueue and flushing the
workqueue (that can contain functions taking the lock of instance A) of
instance A under the lock of instance B, but unless that is nested in a
way that it cannot happen in order BA as well it's actually a possible
ABBA deadlock.


Alright, I'll write a patch description and send it in a minute.

johannes
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.24-rc7 lockdep warning when poweroff, Dave Young, (Mon Jan 14, 5:04 am)
Re: 2.6.24-rc7 lockdep warning when poweroff, Peter Zijlstra, (Mon Jan 14, 5:24 am)
Re: 2.6.24-rc7 lockdep warning when poweroff, Johannes Berg, (Mon Jan 14, 6:35 am)
Re: 2.6.24-rc7 lockdep warning when poweroff, Peter Zijlstra, (Mon Jan 14, 6:41 am)
Re: 2.6.24-rc7 lockdep warning when poweroff, Johannes Berg, (Mon Jan 14, 6:51 am)
Re: 2.6.24-rc7 lockdep warning when poweroff, Johannes Berg, (Tue Jan 15, 6:41 am)
Re: 2.6.24-rc7 lockdep warning when poweroff, Peter Zijlstra, (Tue Jan 15, 8:21 am)
Re: 2.6.24-rc7 lockdep warning when poweroff, Johannes Berg, (Tue Jan 15, 7:54 pm)
Re: 2.6.24-rc7 lockdep warning when poweroff, Johannes Berg, (Tue Jan 15, 8:39 am)
Re: 2.6.24-rc7 lockdep warning when poweroff, Peter Zijlstra, (Tue Jan 15, 8:47 am)
Re: 2.6.24-rc7 lockdep warning when poweroff, Ingo Molnar, (Wed Jan 16, 4:11 am)
Re: 2.6.24-rc7 lockdep warning when poweroff, Dave Young, (Mon Jan 14, 8:31 pm)
Re: 2.6.24-rc7 lockdep warning when poweroff, Dave Young, (Mon Jan 14, 9:24 pm)
Re: 2.6.24-rc7 lockdep warning when poweroff, Peter Zijlstra, (Tue Jan 15, 4:42 am)