android_kernel_xiaomi_sm8350/drivers/atm
Chengfeng Ye e3430b870e 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: 213e85d389 ("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>
2023-12-20 15:41:15 +01:00
..
.gitignore
adummy.c
ambassador.c
ambassador.h
atmtcp.c
eni.c
eni.h
firestream.c
firestream.h
fore200e.c
fore200e.h
he.c
he.h
horizon.c
horizon.h
idt77105.c
idt77105.h
idt77252_tables.h
idt77252.c
idt77252.h
iphase.c
iphase.h
Kconfig
lanai.c
Makefile
midway.h
nicstar.c
nicstar.h
nicstarmac.c
nicstarmac.copyright
solos-attrlist.c
solos-pci.c atm: solos-pci: Fix potential deadlock on &tx_queue_lock 2023-12-20 15:41:15 +01:00
suni.c
suni.h
tonga.h
uPD98401.h
uPD98402.c
uPD98402.h
zatm.c
zatm.h
zeprom.h