diff options
author | Michael Straube <straube.linux@gmail.com> | 2021-08-19 11:24:23 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-08-26 10:40:13 +0200 |
commit | 89b9f3f39a088a7a0f833621dc62acb201a37ac5 (patch) | |
tree | ba9b1f18c85e2d118d42b153384329244314b9dc /drivers/staging/r8188eu | |
parent | 093991aaadf0fbb34184fa37a46e7a157da3f386 (diff) |
staging: r8188eu: fix scheduling while atomic bugs
These allocations are sometimes done under a spin lock so they
have to be atomic. The function call tree is:
-> update_beacon() <- takes a spin lock
-> update_BCNTIM()
-> set_tx_beacon_cmd()
Fixes: 79f712ea994de ("staging: r8188eu: Remove wrappers for kalloc() and kzalloc()")
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210819092423.4349-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/r8188eu')
-rw-r--r-- | drivers/staging/r8188eu/core/rtw_mlme_ext.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 5325fe41fbee..508ef1d330a1 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -8130,13 +8130,13 @@ u8 set_tx_beacon_cmd(struct adapter *padapter) u8 res = _SUCCESS; int len_diff = 0; - ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); + ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC); if (!ph2c) { res = _FAIL; goto exit; } - ptxBeacon_parm = kzalloc(sizeof(struct Tx_Beacon_param), GFP_KERNEL); + ptxBeacon_parm = kzalloc(sizeof(struct Tx_Beacon_param), GFP_ATOMIC); if (!ptxBeacon_parm) { kfree(ph2c); res = _FAIL; |