]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] lockdep: register_lock_class() fix
authorIngo Molnar <mingo@elte.hu>
Thu, 7 Dec 2006 04:40:50 +0000 (20:40 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Thu, 7 Dec 2006 16:39:46 +0000 (08:39 -0800)
commit6b13dd0352831d3b9124cb373401f9513a0dc855
treeb490e5066404eab1ec7cf5147521c0bd53226b07
parent32a8ea6759eaf64b8367107fce92ee60c2e541cc
[PATCH] lockdep: register_lock_class() fix

The hash_lock must only ever be taken with irqs disabled.  This happens in
all the important places, except one codepath: register_lock_class().  The
race should trigger rarely because register_lock_class() is quite rare and
single-threaded (happens during init most of the time).

The fix is to disable irqs.

( bug found live in -rt: there preemption is alot more agressive and
  preempting with the hash-lock held caused a lockup.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/lockdep.c