lkml.org 
[lkml]   [2006]   [May]   [30]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
 
Messages in this thread
/
DateTue, 30 May 2006 21:47:48 +0200
FromIngo Molnar <>
SubjectRe: [patch, -rc5-mm1] lock validator: disable NMI watchdog if CONFIG_LOCKDEP, i386
* Andi Kleen <ak@suse.de> wrote:

> Ingo Molnar <mingo@elte.hu> writes:
> > 
> > The NMI watchdog uses spinlocks (notifier chains, etc.),
> > so it's not lockdep-safe at the moment.
> 
> That's totally unsafe even without lockdep and should be fixed 
> instead. I guess someone bungled the notifier chain conversion. The 
> NMI notifiers need to be lockless.

yeah, totally agreed, they need to be raw notifiers. Havent had time to 
investigate it in detail yet - i went for the easier hack of disabling 
NMIs while lockdep is enabled.

Here's the kernel trace of it happening on x86_64:

   <...>-417   0D... 2983us : __lockdep_acquire (ffffffff81a5cb18 0 0)
   <...>-417   0D... 2983us : __lockdep_acquire (0 0 0)
   <...>-417   0D... 2984us : do_nmi (nmi)
   <...>-417   0D.h. 2985us : default_do_nmi (do_nmi)
   <...>-417   0D.h. 2986us : atomic_notifier_call_chain (default_do_nmi)
   <...>-417   0D.h. 2986us : notifier_call_chain (atomic_notifier_call_chain)
   <...>-417   0D.h. 2987us : nmi_watchdog_tick (default_do_nmi)
   <...>-417   0D.h. 2987us : atomic_notifier_call_chain (nmi_watchdog_tick)
   <...>-417   0D.h. 2987us : notifier_call_chain (atomic_notifier_call_chain)
   <...>-417   0D... 2988us : trace_hardirqs_off (trace_hardirqs_off_thunk)
   <...>-417   0D... 2989us : __lockdep_acquire (1 1 0)
   <...>-417   0D... 2989us : mark_lock (__lockdep_acquire)
   <...>-417   0D... 2989us : mark_lock (__lockdep_acquire)
   <...>-417   0D... 2989us+: mark_lock (__lockdep_acquire)
   <...>-417   0D... 2991us : check_chain_key (__lockdep_acquire)
   <...>-417   0.... 2992us : _raw_spin_lock (_spin_lock)
   <...>-417   0.... 2992us : _spin_lock (dput)
that shouldnt be an atomic_notifier but a raw_notifier.

	Ingo
-
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-05-30 21:50    [from the cache]
©2003-2008