diff options
author | Helge Deller <deller@gmx.de> | 2017-08-04 23:54:19 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2017-08-22 16:34:33 +0200 |
commit | 76cffeb6ccace1ae487e58d8d72b4519861a9d9e (patch) | |
tree | 557a380f095683fd44932c51f0da4d20ef1a78bb /arch/parisc/kernel/unwind.c | |
parent | parisc: PDT: Add full support for memory failure via Page Deallocation Table ... (diff) | |
download | linux-76cffeb6ccace1ae487e58d8d72b4519861a9d9e.tar.xz linux-76cffeb6ccace1ae487e58d8d72b4519861a9d9e.zip |
parisc: Static initialization of spinlocks in perf and unwind code
While testing UBSAN I saw this BUG:
BUG: spinlock bad magic on CPU#0, swapper/0
in unwind code. Let's avoid that by static initialization.
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/kernel/unwind.c')
-rw-r--r-- | arch/parisc/kernel/unwind.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/parisc/kernel/unwind.c b/arch/parisc/kernel/unwind.c index 1b73690477c5..48dc7d4d20bb 100644 --- a/arch/parisc/kernel/unwind.c +++ b/arch/parisc/kernel/unwind.c @@ -34,7 +34,7 @@ extern struct unwind_table_entry __start___unwind[]; extern struct unwind_table_entry __stop___unwind[]; -static spinlock_t unwind_lock; +static DEFINE_SPINLOCK(unwind_lock); /* * the kernel unwind block is not dynamically allocated so that * we can call unwind_init as early in the bootup process as @@ -181,8 +181,6 @@ int __init unwind_init(void) start = (long)&__start___unwind[0]; stop = (long)&__stop___unwind[0]; - spin_lock_init(&unwind_lock); - printk("unwind_init: start = 0x%lx, end = 0x%lx, entries = %lu\n", start, stop, (stop - start) / sizeof(struct unwind_table_entry)); |