linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/2] hyperv: Use raw_spinlock_t when not sleepable
@ 2023-08-09 22:36 Mitchell Levy via B4 Relay
  2023-08-09 22:36 ` [PATCH RFC 1/2] Use raw_spinlock_t for vmbus_channel.sched_lock Mitchell Levy via B4 Relay
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mitchell Levy via B4 Relay @ 2023-08-09 22:36 UTC (permalink / raw)
  To: K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
	Bjorn Helgaas
  Cc: linux-hyperv, linux-kernel, linux-pci, Mitchell Levy

When compiled with PREEMPT_RT, spinlock_t is sleepable. While I did not
observe this causing any lockups on my system, it did cause warnings to
be emitted when compiled with lock debugging. This series fixes some
instances where spinlock_t is used in non-sleepable contexts, though it
almost certainly does not find every such instance.

An example of the warning raised by lockdep:
=============================
[BUG: Invalid wait context ]
6.5.0-rc1+ #16 Not tainted
-----------------------------
swapper/0/1 is trying to lock:
ffffa05a014d64c0 (&channel→sched_lock) {...}-{3:3}, at: vmbus_isr+0x179/0x320
other info that might help us debug this:
context-{2:2}
2 locks held by swapper/0/1:
 #0: ffffffff909a9c70 (misc_mtx){+.+.}-{4:4}, at: misc_register+0x34/0x180
 #1: ffffffff9079b4c8 (rcu_read_lock) {...}-{1:3}, at: rcu_lock_acquire+0x0/0x40
stack backtrace:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.5.0-rc1+ #16
Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS Hyper-V UEFI Release v4.1 05/09/2022

Signed-off-by: Mitchell Levy <levymitchell0@gmail.com>
---
Mitchell Levy (2):
      Use raw_spinlock_t for vmbus_channel.sched_lock
      Use raw_spinlock_t in vmbus_requestor

 drivers/hv/channel.c                | 6 +++---
 drivers/hv/channel_mgmt.c           | 2 +-
 drivers/hv/vmbus_drv.c              | 4 ++--
 drivers/pci/controller/pci-hyperv.c | 6 +++---
 include/linux/hyperv.h              | 8 ++++----
 5 files changed, 13 insertions(+), 13 deletions(-)
---
base-commit: 14f9643dc90adea074a0ffb7a17d337eafc6a5cc
change-id: 20230807-b4-rt_preempt-fix-35a65c90c6c9

Best regards,
-- 
Mitchell Levy <levymitchell0@gmail.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-15 18:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-09 22:36 [PATCH RFC 0/2] hyperv: Use raw_spinlock_t when not sleepable Mitchell Levy via B4 Relay
2023-08-09 22:36 ` [PATCH RFC 1/2] Use raw_spinlock_t for vmbus_channel.sched_lock Mitchell Levy via B4 Relay
2023-08-09 22:36 ` [PATCH RFC 2/2] Use raw_spinlock_t in vmbus_requestor Mitchell Levy via B4 Relay
2023-08-15 18:44 ` [PATCH RFC 0/2] hyperv: Use raw_spinlock_t when not sleepable Michael Kelley (LINUX)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).