Re: [PATCH] staging: r8188eu: scheduling in atomic in rtw_createbss_cmd()

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

 



On 8/12/21 1:58 AM, Dan Carpenter wrote:
A couple of the callers are holding spinlocks so this allocation has to
be atomic.  One spinlock is in rtw_set_802_11_connect() but the simpler
spinlock to review is when this function is called from
rtw_surveydone_event_callback().

Fixes: 15865124feed ("staging: r8188eu: introduce new core dir for RTL8188eu driver")
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
---
  drivers/staging/r8188eu/core/rtw_cmd.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index c3a9051ca10c..ff5b4505a713 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -735,7 +735,7 @@ u8 rtw_createbss_cmd(struct adapter  *padapter)
rtw_led_control(padapter, LED_CTL_START_TO_LINK); - pcmd = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
+	pcmd = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
  	if (!pcmd) {
  		res = _FAIL;
  		goto exit;

Acked-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx>

Thanks,

Larry





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux