Patch "drivers: staging: r8188eu: Fix sleep-in-atomic-context bug in rtw_join_timeout_handler" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drivers: staging: r8188eu: Fix sleep-in-atomic-context bug in rtw_join_timeout_handler

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drivers-staging-r8188eu-fix-sleep-in-atomic-context-.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f2c2f0484f0a1d3634f54860fac91bd8f6986f25
Author: Duoming Zhou <duoming@xxxxxxxxxx>
Date:   Tue Oct 18 16:34:24 2022 +0800

    drivers: staging: r8188eu: Fix sleep-in-atomic-context bug in rtw_join_timeout_handler
    
    [ Upstream commit ce8cc75c7419ad54cb99437543a54c97c7446db5 ]
    
    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: 15865124feed ("staging: r8188eu: introduce new core dir for RTL8188eu driver")
    Signed-off-by: Duoming Zhou <duoming@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221018083424.79741-1-duoming@xxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
index 10550bd2c16d..abfd14bfd5fb 100644
--- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c
+++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
@@ -273,7 +273,7 @@ static s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms)
 			err = -1;
 			break;
 		}
-		msleep(1);
+		mdelay(1);
 	}
 
 	return err;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux