WSL2-Linux-Kernel/arch
Tony Krowiak 86956e7076 s390/vfio-ap: replace open coded locks for VFIO_GROUP_NOTIFY_SET_KVM notification
It was pointed out during an unrelated patch review that locks should not
be open coded - i.e., writing the algorithm of a standard lock in a
function instead of using a lock from the standard library. The setting and
testing of a busy flag and sleeping on a wait_event is the same thing
a lock does. The open coded locks are invisible to lockdep, so potential
locking problems are not detected.

This patch removes the open coded locks used during
VFIO_GROUP_NOTIFY_SET_KVM notification. The busy flag
and wait queue were introduced to resolve a possible circular locking
dependency reported by lockdep when starting a secure execution guest
configured with AP adapters and domains. Reversing the order in which
the kvm->lock mutex and matrix_dev->lock mutex are locked resolves the
issue reported by lockdep, thus enabling the removal of the open coded
locks.

Signed-off-by: Tony Krowiak <akrowiak@linux.ibm.com>
Acked-by: Halil Pasic <pasic@linux.ibm.com>
Link: https://lore.kernel.org/r/20210823212047.1476436-3-akrowiak@linux.ibm.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2021-08-24 12:14:05 -06:00
..
alpha libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
arc Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
arm Networking fixes for 5.14-rc4, including fixes from bpf, can, WiFi (mac80211) 2021-07-30 16:01:36 -07:00
arm64 Networking fixes for 5.14-rc4, including fixes from bpf, can, WiFi (mac80211) 2021-07-30 16:01:36 -07:00
csky Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
h8300 libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
hexagon Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
ia64 libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
m68k libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
microblaze Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
mips Networking fixes for 5.14-rc4, including fixes from bpf, can, WiFi (mac80211) 2021-07-30 16:01:36 -07:00
nds32 nds32: fix up stack guard gap 2021-07-21 15:51:37 +02:00
nios2 Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
openrisc Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
parisc libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
powerpc powerpc fixes for 5.14 #4 2021-08-01 12:18:44 -07:00
riscv Networking fixes for 5.14-rc4, including fixes from bpf, can, WiFi (mac80211) 2021-07-30 16:01:36 -07:00
s390 s390/vfio-ap: replace open coded locks for VFIO_GROUP_NOTIFY_SET_KVM notification 2021-08-24 12:14:05 -06:00
sh libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
sparc Networking fixes for 5.14-rc4, including fixes from bpf, can, WiFi (mac80211) 2021-07-30 16:01:36 -07:00
um Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
x86 Networking fixes for 5.14-rc4, including fixes from bpf, can, WiFi (mac80211) 2021-07-30 16:01:36 -07:00
xtensa libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
.gitignore
Kconfig Kconfig: Introduce ARCH_WANTS_NO_INSTR and CC_HAS_NO_PROFILE_FN_ATTR 2021-06-22 11:07:18 -07:00