[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210819152914.17482-1-straube.linux@gmail.com>
Date: Thu, 19 Aug 2021 17:29:14 +0200
From: Michael Straube <straube.linux@...il.com>
To: gregkh@...uxfoundation.org
Cc: Larry.Finger@...inger.net, phil@...lpotter.co.uk, martin@...ser.cx,
fmdefrancesco@...il.com, linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Michael Straube <straube.linux@...il.com>
Subject: [PATCH] staging: r8188eu: use GFP_ATOMIC under spinlock
kmalloc() in function update_bcn_wps_ie() is called under a spinlock
so the allocation have to be atomic.
-> update_beacon() <- takes a spinlock
-> update_bcn_vendor_spec_ie()
-> update_bcn_wps_ie()
Fixes: 79f712ea994de ("staging: r8188eu: Remove wrappers for kalloc() and kzalloc()")
Signed-off-by: Michael Straube <straube.linux@...il.com>
---
drivers/staging/r8188eu/core/rtw_ap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/core/rtw_ap.c b/drivers/staging/r8188eu/core/rtw_ap.c
index 1f3aa0092ef9..41b5668d080b 100644
--- a/drivers/staging/r8188eu/core/rtw_ap.c
+++ b/drivers/staging/r8188eu/core/rtw_ap.c
@@ -1192,7 +1192,7 @@ static void update_bcn_wps_ie(struct adapter *padapter)
remainder_ielen = ielen - wps_offset - wps_ielen;
if (remainder_ielen > 0) {
- pbackup_remainder_ie = kmalloc(remainder_ielen, GFP_KERNEL);
+ pbackup_remainder_ie = kmalloc(remainder_ielen, GFP_ATOMIC);
if (pbackup_remainder_ie)
memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen);
}
--
2.32.0
Powered by blists - more mailing lists