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: 79f712ea99 ("staging: r8188eu: Remove wrappers for kalloc() and kzalloc()")
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210819152914.17482-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Michael Straube 2021-08-19 17:29:14 +02:00 committed by Greg Kroah-Hartman
parent 89b9f3f39a
commit 55cdf7d7b2

View file

@ -1293,7 +1293,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);
}