lkml.org 
[lkml]   [2006]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] lockdep: fix possible races while disabling lock-debugging
On Thu, Dec 07, 2006 at 02:29:03PM +0100, Ingo Molnar wrote:
> Subject: [patch] lockdep: fix possible races while disabling lock-debugging
> From: Ingo Molnar <mingo@elte.hu>
...
> (also note that as we all know the Linux kernel is, by definition,
> bug-free and perfect, so this code never triggers, so these fixes are
> highly theoretical. I wrote this patch for aesthetic reasons alone.)

Now it's too sexy! I can't work.

PS: I had some problems with patching - probably
because of something from -mm, but:

> Signed-off-by: Ingo Molnar <mingo@elte.hu>
...
> @@ -567,12 +601,10 @@ static noinline int print_circular_bug_t
> if (debug_locks_silent)
> return 0;
>
> - /* hash_lock unlocked by the header */
> - __raw_spin_lock(&hash_lock);
> this.class = check_source->class;
> if (!save_trace(&this.trace))
> return 0;
> - __raw_spin_unlock(&hash_lock);
> +

IMHO lock is needed here for save_trace.

...
> @@ -1212,7 +1244,8 @@ register_lock_class(struct lockdep_map *
> hash_head = classhashentry(key);
>
> raw_local_irq_save(flags);
> - __raw_spin_lock(&hash_lock);
> + if (!graph_lock())

! raw_local_irq_restore(flags);

> + return NULL;
> /*
> * We have to do the hash-walk again, to avoid races
> * with another CPU:

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

\
 
 \ /
  Last update: 2006-12-08 07:23    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site