Skip to contentSkip to conversation

staging: r8188eu: fix scheduling while atomic bugs

PATCH Superseded Michael Straube 1 participant 1 message Aug 18, 2021 Staging

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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()
---
 drivers/staging/r8188eu/core/rtw_mlme_ext.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/r8188eu/core/rtw_mlme_ext.c +2 -2
index f6ee72d5af09..b7df269e4149 100644
@@ -8129,13 +8129,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;
Signature · 1 line
2.32.0