1
0
Fork 0
alistair23-linux/arch/um
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
..
configs um: configs: Remove useless UEVENT_HELPER_PATH 2019-07-02 23:27:41 +02:00
drivers um: ubd: Prevent buffer overrun on command completion 2020-04-23 10:36:35 +02:00
include Revert "um: Enable CONFIG_CONSTRUCTORS" 2020-02-01 09:34:53 +00:00
kernel um: change sigio_spinlock to a mutex 2020-11-05 11:43:14 +01:00
os-Linux um: falloc.h needs to be directly included for older libc 2020-04-23 10:36:39 +02:00
scripts License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
.gitignore um: tell git to ignore generated files 2010-03-06 11:26:28 -08:00
Kconfig um: Implement copy_thread_tls 2020-01-14 20:08:35 +01:00
Kconfig.debug um: Make GCOV depend on !KCOV 2018-12-27 22:48:19 +01:00
Makefile um: ensure `make ARCH=um mrproper` removes arch/$(SUBARCH)/include/generated/ 2020-05-02 08:48:53 +02:00
Makefile-os-Linux x86, um: get rid of arch/um/os symlink 2008-10-22 22:55:22 -07:00
Makefile-skas