mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
staging: r8188eu: Use GFP_ATOMIC under spin lock
A spin lock is taken in __nat25_db_network_insert() and
update_BCNTIM() is called under spin lock so we should
use GFP_ATOMIC in both place.
Fixes: 15865124fe ("staging: r8188eu: introduce new core dir for RTL8188eu driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210810125314.2182112-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
dcda94c941
commit
e3027f25c6
|
|
@ -98,7 +98,7 @@ static void update_BCNTIM(struct adapter *padapter)
|
|||
}
|
||||
|
||||
if (remainder_ielen > 0) {
|
||||
pbackup_remainder_ie = kmalloc(remainder_ielen, GFP_KERNEL);
|
||||
pbackup_remainder_ie = kmalloc(remainder_ielen, GFP_ATOMIC);
|
||||
if (pbackup_remainder_ie && premainder_ie)
|
||||
memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -394,7 +394,7 @@ static void __nat25_db_network_insert(struct adapter *priv,
|
|||
}
|
||||
db = db->next_hash;
|
||||
}
|
||||
db = kmalloc(sizeof(*db), GFP_KERNEL);
|
||||
db = kmalloc(sizeof(*db), GFP_ATOMIC);
|
||||
if (!db) {
|
||||
spin_unlock_bh(&priv->br_ext_lock);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user