linux-stable/drivers/staging/r8188eu
Duoming Zhou 9494faf74f drivers: staging: r8188eu: Fix sleep-in-atomic-context bug in rtw_join_timeout_handler
[ Upstream commit ce8cc75c74 ]

The rtw_join_timeout_handler() is a timer handler that
runs in atomic context, but it could call msleep().
As a result, the sleep-in-atomic-context bug will happen.
The process is shown below:

     (atomic context)
rtw_join_timeout_handler
 _rtw_join_timeout_handler
  rtw_do_join
   rtw_select_and_join_from_scanned_queue
    rtw_indicate_disconnect
     rtw_lps_ctrl_wk_cmd
      lps_ctrl_wk_hdl
       LPS_Leave
        LPS_RF_ON_check
         msleep //sleep in atomic context

Fix by removing msleep() and replacing with mdelay().

Fixes: 15865124fe ("staging: r8188eu: introduce new core dir for RTL8188eu driver")
Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
Link: https://lore.kernel.org/r/20221018083424.79741-1-duoming@zju.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:32:38 +01:00
..
core drivers: staging: r8188eu: Fix sleep-in-atomic-context bug in rtw_join_timeout_handler 2022-12-31 13:32:38 +01:00
hal staging: r8188eu: remove PHY_RFConfig8188E() 2022-09-30 14:34:36 +02:00
include staging: r8188eu: remove PHY_RFConfig8188E() 2022-09-30 14:34:36 +02:00
os_dep staging: r8188eu: remove recv_osdep.h 2022-09-24 13:07:57 +02:00
Kconfig
Makefile staging: r8188eu: remove hal/odm_RegConfig8188E.c 2022-09-27 10:28:11 +02:00
TODO