From bde40898c814362e8041cad0e989c7a749c417ec Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Tue, 5 Oct 2010 15:54:00 +0000 Subject: [PATCH] sh: fix uninitialized spinlock 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 Cc: Paul Mundt Cc: linux-sh@vger.kernel.org Signed-off-by: Paul Mundt --- arch/sh/kernel/traps_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sh/kernel/traps_64.c b/arch/sh/kernel/traps_64.c index e67e140bf1f6..fda6355654b7 100644 --- a/arch/sh/kernel/traps_64.c +++ b/arch/sh/kernel/traps_64.c @@ -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) { -- 2.39.5