sh: fix uninitialized spinlock
authorAkinobu Mita <akinobu.mita@gmail.com>
Tue, 5 Oct 2010 15:54:00 +0000 (15:54 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 6 Oct 2010 07:53:27 +0000 (16:53 +0900)
The spinlock in traps_64.c is used without initialization.
This fixes it by declaring DEFINE_SPINLOCK() and makes the spinlock static
variable.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: linux-sh@vger.kernel.org
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/traps_64.c

index e67e140..fda6355 100644 (file)
@@ -50,7 +50,7 @@ asmlinkage void do_##name(unsigned long error_code, struct pt_regs *regs) \
        do_unhandled_exception(trapnr, signr, str, __stringify(name), error_code, regs, current); \
 }
 
-spinlock_t die_lock;
+static DEFINE_SPINLOCK(die_lock);
 
 void die(const char * str, struct pt_regs * regs, long err)
 {