sh: fix uninitialized spinlock
PATCH 1/1 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.
--- arch/sh/kernel/traps_64.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/sh/kernel/traps_64.c +1 -1
@@ -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) {
Signature · 1 line
1.6.0.6
Quoted 7 lines · Akinobu Mita
The spinlock in
traps_64.cis used without initialization. This fixes it by declaringDEFINE_SPINLOCK()and makes the spinlock static variable.
Hmm, there was a reason why this was non-static before, but it seems like whatever that was has since corrected itself. Applied, thanks!