kernel_samsung_a53x/drivers/atm
Chengfeng Ye 4d54e4aa98 atm: solos-pci: Fix potential deadlock on &tx_queue_lock
[ Upstream commit 15319a4e8ee4b098118591c6ccbd17237f841613 ]

As &card->tx_queue_lock is acquired under softirq context along the
following call chain from solos_bh(), other acquisition of the same
lock inside process context should disable at least bh to avoid double
lock.

<deadlock #2>
pclose()
--> spin_lock(&card->tx_queue_lock)
<interrupt>
   --> solos_bh()
   --> fpga_tx()
   --> spin_lock(&card->tx_queue_lock)

This flaw was found by an experimental static analysis tool I am
developing for irq-related deadlock.

To prevent the potential deadlock, the patch uses spin_lock_bh()
on &card->tx_queue_lock under process context code consistently to
prevent the possible deadlock scenario.

Fixes: 213e85d38912 ("solos-pci: clean up pclose() function")
Signed-off-by: Chengfeng Ye <dg573847474@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 12:11:48 +01:00
..
adummy.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ambassador.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ambassador.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atmtcp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
eni.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
eni.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
firestream.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
firestream.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fore200e.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fore200e.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
he.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
he.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
horizon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
horizon.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
idt77105.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
idt77105.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
idt77252.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
idt77252.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
idt77252_tables.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iphase.c atm: iphase: Do PCI error checks on own line 2024-11-18 11:43:14 +01:00
iphase.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lanai.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
midway.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nicstar.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nicstar.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nicstarmac.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nicstarmac.copyright Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
solos-attrlist.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
solos-pci.c atm: solos-pci: Fix potential deadlock on &tx_queue_lock 2024-11-18 12:11:48 +01:00
suni.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
suni.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tonga.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uPD98401.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uPD98402.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uPD98402.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zatm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zatm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zeprom.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00