Duoming Zhou
0bfaff00d1
NFC: hci: fix sleep in atomic context bugs in nfc_hci_hcp_message_tx
...
[ Upstream commit b413b0cb008646e9f24ce5253cb3cf7ee217aff6 ]
There are sleep in atomic context bugs when the request to secure
element of st21nfca is timeout. The root cause is that kzalloc and
alloc_skb with GFP_KERNEL parameter and mutex_lock are called in
st21nfca_se_wt_timeout which is a timer handler. The call tree shows
the execution paths that could lead to bugs:
(Interrupt context)
st21nfca_se_wt_timeout
nfc_hci_send_event
nfc_hci_hcp_message_tx
kzalloc(..., GFP_KERNEL) //may sleep
alloc_skb(..., GFP_KERNEL) //may sleep
mutex_lock() //may sleep
This patch moves the operations that may sleep into a work item.
The work item will run in another kernel thread which is in
process context to execute the bottom half of the interrupt.
So it could prevent atomic context from sleeping.
Fixes: 2130fb97fe ("NFC: st21nfca: Adding support for secure element")
Signed-off-by: Duoming Zhou <[email protected] >
Reviewed-by: Krzysztof Kozlowski <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected] >
Signed-off-by: Sasha Levin <[email protected] >
2022-06-14 18:11:38 +02:00
..
accessibility
acpi
ACPI: PM: Block ASUS B1400CEAE from suspend to idle by default
2022-06-14 18:11:28 +02:00
amba
ARM: 9120/1: Revert "amba: make use of -1 IRQs warn"
2021-11-06 13:59:45 +01:00
android
binder: fix handling of error during copy
2022-01-27 09:19:38 +01:00
ata
ata: pata_marvell: Check the 'bmdma_addr' beforing reading
2022-04-27 13:50:48 +02:00
atm
atm: eni: Add check for dma_map_single
2022-03-23 09:12:07 +01:00
auxdisplay
auxdisplay: ht16k33: Fix frame buffer device blanking
2021-11-17 09:48:45 +01:00
base
firmware_loader: use kernel credentials when reading firmware
2022-05-25 09:14:38 +02:00
bcma
block
virtio_blk: fix the discard_granularity and discard_alignment queue limits
2022-06-14 18:11:35 +02:00
bluetooth
Bluetooth: btmtksdio: Fix kernel oops in btmtksdio_interrupt
2022-04-15 14:18:16 +02:00
bus
bus: sunxi-rsb: Fix the return value of sunxi_rsb_device_create()
2022-05-09 09:03:25 +02:00
cdrom
char
ipmi: Fix pr_fmt to avoid compilation issues
2022-06-14 18:11:28 +02:00
clk
clk: at91: generated: consider range when calculating best rate
2022-05-25 09:14:36 +02:00
clocksource
clocksource: acpi_pm: fix return value of __setup handler
2022-04-15 14:18:05 +02:00
connector
counter
cpufreq
Revert "cpufreq: Fix possible race in cpufreq online error path"
2022-06-14 18:11:36 +02:00
cpuidle
cpuidle: Fix kobject memory leaks in error paths
2021-11-17 09:48:36 +01:00
crypto
crypto: qcom-rng - fix infinite loop on requests not multiple of WORD_SZ
2022-05-25 09:14:34 +02:00
dax
dax: make sure inodes are flushed before destroy cache
2022-04-15 14:18:12 +02:00
dca
devfreq
PM / devfreq: rk3399_dmc: Disable edev on remove()
2022-06-14 18:11:29 +02:00
dio
dma
dma: at_xdmac: fix a missing check on list iterator
2022-04-27 13:50:48 +02:00
dma-buf
udmabuf: validate ubuf->pagecount
2022-04-15 14:18:10 +02:00
edac
EDAC/synopsys: Read the error count from the correct register
2022-04-27 13:50:48 +02:00
eisa
extcon
firewire
firewire: core: extend card->lock in fw_core_handle_bus_reset
2022-05-12 12:23:41 +02:00
firmware
firmware: google: Properly state IOMEM dependency
2022-04-15 14:18:20 +02:00
fpga
fsi
gnss
gpio
gpio: mvebu/pwm: Refuse requests with inverted polarity
2022-05-25 09:14:37 +02:00
gpu
drm: msm: fix possible memory leak in mdp5_crtc_cursor_set()
2022-06-14 18:11:38 +02:00
greybus
greybus: svc: fix an error handling bug in gb_svc_hello()
2022-04-15 14:17:58 +02:00
hid
HID: elan: Fix potential double free in elan_input_configured
2022-06-14 18:11:33 +02:00
hsi
HSI: core: Fix return freed object in hsi_new_client
2022-01-27 09:19:41 +01:00
hv
Drivers: hv: vmbus: Prevent load re-ordering when reading ring buffer
2022-04-20 09:19:36 +02:00
hwmon
hwmon: Make chip parameter for with_info API mandatory
2022-06-14 18:11:29 +02:00
hwspinlock
hwtracing
coresight: Fix TRCCONFIGR.QE sysfs interface
2022-04-15 14:17:57 +02:00
i2c
drivers: i2c: thunderx: Allow driver to work with ACPI defined TWSI controllers
2022-06-06 08:33:49 +02:00
i3c
ide
idle
iio
iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on()
2022-05-09 09:03:21 +02:00
infiniband
RDMA/hfi1: Prevent panic when SDMA is disabled
2022-06-14 18:11:31 +02:00
input
Input: goodix - fix spurious key release events
2022-06-06 08:33:48 +02:00
interconnect
iommu
iommu/arm-smmu-v3: fix event handling soft lockup
2022-04-15 14:18:33 +02:00
ipack
irqchip
irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value
2022-06-14 18:11:35 +02:00
isdn
mISDN: change function names to avoid conflicts
2022-01-11 15:23:33 +01:00
leds
lightnvm
lightnvm: disable the subsystem
2022-05-09 09:03:20 +02:00
macintosh
macintosh/via-pmu: Fix build failure when CONFIG_INPUT is disabled
2022-06-14 18:11:31 +02:00
mailbox
mailbox: tegra-hsp: Flush whole channel
2022-04-15 14:18:01 +02:00
mcb
md
md/bitmap: don't set sb values if can't pass sanity check
2022-06-14 18:11:26 +02:00
media
media: ov7670: remove ov7670_power_off from ov7670_remove
2022-06-14 18:11:37 +02:00
memory
memory: atmel-ebi: Fix missing of_node_put in atmel_ebi_probe
2022-04-20 09:19:34 +02:00
memstick
memstick: jmb38x_ms: use appropriate free function in jmb38x_ms_alloc_host()
2021-11-17 09:48:37 +01:00
message
mfd
mfd: asic3: Add missing iounmap() on error asic3_mfd_probe
2022-04-15 14:18:17 +02:00
misc
kgdbts: fix return value of __setup handler
2022-04-15 14:18:20 +02:00
mmc
mmc: jz4740: Apply DMA engine limits to maximum segment size
2022-06-14 18:11:26 +02:00
mtd
mtd: rawnand: Fix return value check of wait_for_completion_timeout
2022-05-09 09:03:24 +02:00
mux
net
ath9k_htc: fix potential out of bounds access with invalid rxstatus->rs_keyix
2022-06-14 18:11:33 +02:00
nfc
NFC: hci: fix sleep in atomic context bugs in nfc_hci_hcp_message_tx
2022-06-14 18:11:38 +02:00
ntb
nubus
nvdimm
nvme
nvme-pci: fix a NULL pointer dereference in nvme_alloc_admin_tags
2022-06-14 18:11:28 +02:00
nvmem
of
of: overlay: do not break notify on NOTIFY_{OK|STOP}
2022-06-14 18:11:34 +02:00
opp
opp: Fix return in _opp_add_static_v2()
2021-11-17 09:48:44 +01:00
oprofile
parisc
parisc: Fix CPU affinity for Lasi, WAX and Dino chips
2022-04-15 14:18:36 +02:00
parport
pci
PCI: Avoid pci_dev_lock() AB/BA deadlock with sriov_numvfs_store()
2022-06-14 18:11:30 +02:00
pcmcia
pcmcia: fix setting of kthread task states
2022-01-27 09:19:37 +01:00
perf
arm_pmu: Validate single/group leader events
2022-04-27 13:50:50 +02:00
phy
phy: ti: Add missing pm_runtime_disable() in serdes_am654_probe
2022-05-09 09:03:24 +02:00
pinctrl
pinctrl: sunxi: fix f1c100s uart2 function
2022-06-06 08:33:49 +02:00
platform
platform/chrome: cros_ec_debugfs: detach log reader wq from devm
2022-05-25 09:14:33 +02:00
pnp
power
power: supply: axp288-charger: Set Vhold to 4.4V
2022-04-15 14:18:33 +02:00
powercap
pps
ps3
ptp
ptp: replace snprintf with sysfs_emit
2022-04-15 14:18:32 +02:00
pwm
pwm: lpc18xx-sct: Initialize driver data and hardware before pwmchip_add()
2022-04-15 14:18:17 +02:00
rapidio
ras
regulator
regulator: pfuze100: Fix refcount leak in pfuze_parse_regulators_dt
2022-06-14 18:11:37 +02:00
remoteproc
remoteproc: qcom_wcnss: Add missing of_node_put() in wcnss_alloc_memory_region
2022-04-15 14:18:19 +02:00
reset
reset: tegra-bpmp: Restore Handle errors in BPMP response
2022-04-27 13:50:47 +02:00
rpmsg
rpmsg: char: Fix race between the release of rpmsg_eptdev and cdev
2022-02-01 17:24:36 +01:00
rtc
rtc: mc146818-lib: Fix the AltCentury for AMD platforms
2022-05-25 09:14:32 +02:00
s390
s390/lcs: fix variable dereferenced before check
2022-05-18 09:47:25 +02:00
sbus
scsi
scsi: ufs: core: Exclude UECxx from SFR dump list
2022-06-14 18:11:34 +02:00
sfi
sh
maple: fix wrong return value of maple_bus_init().
2021-11-26 10:47:17 +01:00
siox
slimbus
slimbus: qcom: Fix IRQ check in qcom_slim_probe
2022-05-18 09:47:27 +02:00
soc
soc: ti: wkup_m3_ipc: Fix IRQ check in wkup_m3_ipc_probe
2022-04-15 14:18:07 +02:00
soundwire
spi
spi: img-spfi: Fix pm_runtime_get_sync() error checking
2022-06-14 18:11:33 +02:00
spmi
ssb
staging
staging: rtl8723bs: prevent ->Ssid overflow in rtw_wx_set_scan()
2022-06-06 08:33:48 +02:00
target
scsi: target: tcmu: Fix possible page UAF
2022-04-20 09:19:36 +02:00
tc
tee
optee: use driver internal tee_context for some rpc
2022-03-02 11:41:04 +01:00
thermal
thermal/drivers/broadcom: Fix potential NULL dereference in sr_thermal_probe
2022-06-14 18:11:38 +02:00
thunderbolt
tty
tty/serial: digicolor: fix possible null-ptr-deref in digicolor_uart_probe()
2022-05-18 09:47:28 +02:00
uio
usb
usb: core: hcd: Add support for deferring roothub registration
2022-06-14 18:11:24 +02:00
vfio
vhost
Fix double fget() in vhost_net_set_backend()
2022-05-25 09:14:34 +02:00
video
fbcon: Consistently protect deferred_takeover with console_lock()
2022-06-14 18:11:25 +02:00
virt
virtio
virtio: acknowledge all features before access
2022-03-16 13:21:48 +01:00
visorbus
vlynq
vme
w1
w1: w1_therm: fixes w1_seq for ds28ea00 sensors
2022-04-15 14:18:35 +02:00
watchdog
ar7: fix kernel builds for compiler test
2021-11-17 09:48:46 +01:00
xen
xen/gnttab: fix gnttab_end_foreign_access() without page specified
2022-03-11 11:22:39 +01:00
zorro
Kconfig
Makefile