Messages in this thread | | | Subject | Re: [PATCH 1/2] lockdep: implement full check without irq checking | From | Peter Zijlstra <> | Date | Wed, 29 Oct 2008 16:23:16 +0100 |
| |
On Thu, 2008-10-23 at 21:44 +0200, Johannes Berg wrote: > This patch implements a new check type "3" which means "full validation > but without irq tracing" in order to allow some certain fake locks that > are only added for deadlock detection to not cause inconsistent state > warnings which would be inappropriate for them.
This thing worries me, can you help my exhausted brain a long a little..
So I take it the idea is to couple the lock chains of the site calling del_timer_sync and the actual timer.
We do this by holding a fake lock while executing the timer, so that its lock chain starts with that lock.
We then acquire the fake lock on del_timer_sync so as to establish a relation.
Now you get warnings about using a lock in hardirq context that was previously used !irq-safe, right?
So why not simply write something like:
del_timer_sync():
local_irq_save(flags); lock_aquire(my fake timer lock); lock_release(...); local_irq_restore(flags);
and make that conditional CONFIG_PROVE_LOCKING and or wrap it up somewhere..
| |