1
0
Fork 0
alistair23-linux/arch/um/kernel
Johannes Berg 15c7ec03dd um: change sigio_spinlock to a mutex
[ Upstream commit f2d05059e1 ]

Lockdep complains at boot:

=============================
[ BUG: Invalid wait context ]
5.7.0-05093-g46d91ecd597b #98 Not tainted
-----------------------------
swapper/1 is trying to lock:
0000000060931b98 (&desc[i].request_mutex){+.+.}-{3:3}, at: __setup_irq+0x11d/0x623
other info that might help us debug this:
context-{4:4}
1 lock held by swapper/1:
 #0: 000000006074fed8 (sigio_spinlock){+.+.}-{2:2}, at: sigio_lock+0x1a/0x1c
stack backtrace:
CPU: 0 PID: 1 Comm: swapper Not tainted 5.7.0-05093-g46d91ecd597b #98
Stack:
 7fa4fab0 6028dfd1 0000002a 6008bea5
 7fa50700 7fa50040 7fa4fac0 6028e016
 7fa4fb50 6007f6da 60959c18 00000000
Call Trace:
 [<60023a0e>] show_stack+0x13b/0x155
 [<6028e016>] dump_stack+0x2a/0x2c
 [<6007f6da>] __lock_acquire+0x515/0x15f2
 [<6007eb50>] lock_acquire+0x245/0x273
 [<6050d9f1>] __mutex_lock+0xbd/0x325
 [<6050dc76>] mutex_lock_nested+0x1d/0x1f
 [<6008e27e>] __setup_irq+0x11d/0x623
 [<6008e8ed>] request_threaded_irq+0x169/0x1a6
 [<60021eb0>] um_request_irq+0x1ee/0x24b
 [<600234ee>] write_sigio_irq+0x3b/0x76
 [<600383ca>] sigio_broken+0x146/0x2e4
 [<60020bd8>] do_one_initcall+0xde/0x281

Because we hold sigio_spinlock and then get into requesting
an interrupt with a mutex.

Change the spinlock to a mutex to avoid that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-11-05 11:43:14 +01:00
..
skas um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
Makefile um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
asm-offsets.c um: get rid of pointless include "..." where include <...> will do 2012-10-09 22:28:45 +02:00
config.c.in um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
dyn.lds.S Revert "um: Enable CONFIG_CONSTRUCTORS" 2020-02-01 09:34:53 +00:00
early_printk.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
exec.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
exitcode.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
gmon_syms.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
gprof_syms.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
initrd.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
irq.c um: irq: Fix LAST_IRQ usage in init_IRQ() 2019-09-16 08:38:58 +02:00
kmsg_dump.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ksyms.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
maccess.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mem.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
physmem.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
process.c um: Implement copy_thread_tls 2020-01-14 20:08:35 +01:00
ptrace.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
reboot.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
sigio.c um: change sigio_spinlock to a mutex 2020-11-05 11:43:14 +01:00
signal.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
stacktrace.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
syscall.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
sysrq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
time.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
tlb.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
trap.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
um_arch.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
umid.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
uml.lds.S um: Place (soft)irq text with macros 2019-09-15 21:37:12 +02:00
vmlinux.lds.S arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0 2009-09-20 12:28:22 +02:00