staging: r8188eu: use GFP_ATOMIC under spinlock

commit 4a293eaf92 upstream.

In function rtw_report_sec_ie() kzalloc() is called under a spinlock,
so the allocation have to be atomic.

Call tree:

-> rtw_select_and_join_from_scanned_queue() <- takes a spinlock
   -> rtw_joinbss_cmd()
      -> rtw_restruct_sec_ie()
         -> rtw_report_sec_ie()

Fixes: 2b42bd58b3 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211108105537.31655-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Michael Straube
2021-11-08 11:55:37 +01:00
committed by Greg Kroah-Hartman
parent b0d61266f5
commit 788fa64fa8

View File

@ -114,7 +114,7 @@ void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)
buff = NULL; buff = NULL;
if (authmode == _WPA_IE_ID_) { if (authmode == _WPA_IE_ID_) {
buff = kzalloc(IW_CUSTOM_MAX, GFP_KERNEL); buff = kzalloc(IW_CUSTOM_MAX, GFP_ATOMIC);
if (!buff) if (!buff)
return; return;
p = buff; p = buff;