mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
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: 79f712ea99
("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>
This commit is contained in:
parent
093991aaad
commit
89b9f3f39a
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue