linux-stable/drivers/misc
Guilherme G. Piccoli ede2512937 misc/pvpanic: Convert regular spinlock into trylock on panic path
[ Upstream commit e918c10265 ]

The pvpanic driver relies on panic notifiers to execute a callback
on panic event. Such function is executed in atomic context - the
panic function disables local IRQs, preemption and all other CPUs
that aren't running the panic code.

With that said, it's dangerous to use regular spinlocks in such path,
as introduced by commit b3c0f87746 ("misc/pvpanic: probe multiple instances").
This patch fixes that by replacing regular spinlocks with the trylock
safer approach.

It also fixes an old comment (about a long gone framebuffer code) and
the notifier priority - we should execute hypervisor notifiers early,
deferring this way the panic action to the hypervisor, as expected by
the users that are setting up pvpanic.

Fixes: b3c0f87746 ("misc/pvpanic: probe multiple instances")
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Mihai Carabas <mihai.carabas@oracle.com>
Cc: Shile Zhang <shile.zhang@linux.alibaba.com>
Cc: Wang ShaoBo <bobo.shaobowang@huawei.com>
Cc: zhenwei pi <pizhenwei@bytedance.com>
Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
Link: https://lore.kernel.org/r/20220427224924.592546-6-gpiccoli@igalia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 18:36:06 +02:00
..
altera-stapl
bcm-vk misc: bcm-vk: fix tty registration race 2021-09-21 16:17:15 +02:00
c2port
cardreader misc: alcor_pci: Fix an error handling path 2022-04-08 14:23:44 +02:00
cb710 cb710: avoid NULL pointer subtraction 2021-10-05 15:50:05 +02:00
cxl
echo
eeprom eeprom: at25: Use DMA safe buffers 2022-05-09 09:14:44 +02:00
genwqe misc: genwqe: Fixes DMA mask setting 2021-09-14 10:45:41 +02:00
habanalabs habanalabs: fix possible memory leak in MMU DR fini 2022-04-13 20:59:12 +02:00
ibmasm
lis3lv02d
lkdtm lkdtm/bugs: Don't expect thread termination without CONFIG_UBSAN_TRAP 2022-06-14 18:36:03 +02:00
mei mei: avoid iterator usage outside of list_for_each_entry 2022-04-08 14:22:49 +02:00
ocxl misc: ocxl: fix possible double free in ocxl_file_register_afu 2022-06-09 10:23:06 +02:00
pvpanic misc/pvpanic: Convert regular spinlock into trylock on panic path 2022-06-14 18:36:06 +02:00
sgi-gru
sgi-xp
ti-st
uacce
vmw_vmci
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c
apds9802als.c
atmel-ssc.c
bh1770glc.c
cs5535-mfgpt.c
ds1682.c
dummy-irq.c
dw-xdata-pcie.c
enclosure.c
fastrpc.c misc: fastrpc: fix an incorrect NULL check on list iterator 2022-06-14 18:36:04 +02:00
gehc-achc.c misc: gehc: Add SPI ID table 2021-10-05 15:47:18 +02:00
hi6421v600-irq.c
hisi_hikey_usb.c
hmc6352.c
hpilo.c
hpilo.h
ibmvmc.c
ibmvmc.h
ics932s401.c
isl29003.c
isl29020.c
Kconfig misc: HI6421V600_IRQ should depend on HAS_IOMEM 2021-10-05 16:07:56 +02:00
kgdbts.c kgdbts: fix return value of __setup handler 2022-04-08 14:23:50 +02:00
lattice-ecp3-config.c misc: lattice-ecp3-config: Fix task hung when firmware load failed 2022-01-27 11:04:17 +01:00
Makefile IIO / Staging driver update for 5.15-rc1 2021-09-01 09:45:57 -07:00
pch_phub.c
pci_endpoint_test.c pci-v5.15-changes 2021-09-07 19:13:42 -07:00
phantom.c
qcom-coincell.c
sram-exec.c
sram.c
sram.h
tifm_7xx1.c
tifm_core.c
tsl2550.c
vmw_balloon.c
xilinx_sdfec.c