linux/drivers/staging
Duoming Zhou 028c8632a2 staging: rtl8192u: Fix sleep in atomic context bug in dm_fsync_timer_callback
[ Upstream commit 6a0c054930 ]

There are sleep in atomic context bugs when dm_fsync_timer_callback is
executing. The root cause is that the memory allocation functions with
GFP_KERNEL or GFP_NOIO parameters are called in dm_fsync_timer_callback
which is a timer handler. The call paths that could trigger bugs are
shown below:

    (interrupt context)
dm_fsync_timer_callback
  write_nic_byte
    kzalloc(sizeof(data), GFP_KERNEL); //may sleep
    usb_control_msg
      kmalloc(.., GFP_NOIO); //may sleep
  write_nic_dword
    kzalloc(sizeof(data), GFP_KERNEL); //may sleep
    usb_control_msg
      kmalloc(.., GFP_NOIO); //may sleep

This patch uses delayed work to replace timer and moves the operations
that may sleep into the delayed work in order to mitigate bugs.

Fixes: 8fc8598e61 ("Staging: Added Realtek rtl8192u driver to staging")
Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
Link: https://lore.kernel.org/r/20220710103002.63283-1-duoming@zju.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-08-21 15:15:57 +02:00
..
android staging: ion: Prevent incorrect reference counting behavour 2022-04-27 13:53:57 +02:00
axis-fifo
board staging: board: Fix uninitialized spinlock when attaching genpd 2021-09-18 13:40:20 +02:00
clocking-wizard clk: staging: correct reference to config IOMEM to config HAS_IOMEM 2021-09-15 09:50:41 +02:00
comedi comedi: vmk80xx: fix expression for tx buffer size 2022-06-22 14:13:18 +02:00
emxx_udc
fbtft staging: fbtft: fb_st7789v: reset display before initialization 2022-03-28 09:57:08 +02:00
fieldbus staging: fieldbus: Fix the error handling path in anybuss_host_common_probe() 2022-06-14 18:32:31 +02:00
fsl-dpaa2
fwserial
gasket
gdm724x staging: gdm724x: fix use after free in gdm_lte_rx() 2022-03-16 14:16:01 +01:00
goldfish
greybus staging: greybus: codecs: fix type confusion of list iterator variable 2022-06-14 18:32:30 +02:00
gs_fpgaboot
hikey9xx
iio staging:iio:adc:ad7280a: Fix handing of device address bit reversing. 2022-04-08 14:40:24 +02:00
kpc2000
ks7010 staging: ks7010: select CRYPTO_HASH/CRYPTO_MICHAEL_MIC 2021-11-18 14:04:18 +01:00
media media: cedrus: hevc: Add check for invalid timestamp 2022-08-21 15:15:50 +02:00
most staging: most: dim2: use device release method 2021-12-17 10:14:40 +01:00
mt7621-dma
mt7621-dts staging: mt7621-dts: fix pinctrl-0 items to be size-1 items on ethernet 2022-04-08 14:40:42 +02:00
mt7621-pci
mt7621-pci-phy
mt7621-pinctrl pinctrl: ralink: Check for null return of devm_kcalloc 2022-07-29 17:19:11 +02:00
netlogic
nvec
octeon
octeon-usb
olpc_dcon
pi433
qlge
ralink-gdma
rtl8188eu
rtl8192e drivers: staging: rtl8192e: Fix deadlock in rtllib_beacons_stop() 2022-06-14 18:32:42 +02:00
rtl8192u staging: rtl8192u: Fix sleep in atomic context bug in dm_fsync_timer_callback 2022-08-21 15:15:57 +02:00
rtl8712 staging: rtl8712: fix uninit-value in r871xu_drv_init() 2022-06-14 18:32:43 +02:00
rtl8723bs staging: rtl8723bs: prevent ->Ssid overflow in rtw_wx_set_scan() 2022-05-30 09:33:22 +02:00
rts5208 staging: rts5208: Fix get_ms_information() heap buffer size 2021-09-18 13:40:30 +02:00
sm750fb
unisys
vc04_services staging: vchiq_core: handle NULL result of find_service_by_handle 2022-04-13 21:01:01 +02:00
vme
vt6655
vt6656
wfx staging: wfx: fix an error handling in wfx_init_common() 2022-04-13 21:01:01 +02:00
wlan-ng staging: wlan-ng: Avoid bitwise vs logical OR warning in hfa384x_usb_throttlefn() 2022-01-16 09:14:24 +01:00
Kconfig
Makefile