Commit 55cdf7d7 authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman
Browse files

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: 79f712ea ("staging: r8188eu: Remove wrappers for kalloc() and kzalloc()")
Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210819152914.17482-1-straube.linux@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 89b9f3f3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}