lkml.org 
[lkml]   [2008]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] lockdep: implement full check without irq checking
From
Date
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..





\
 
 \ /
  Last update: 2008-10-29 19:05    [W:0.763 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site