Commit e3027f25 authored by Yang Yingliang's avatar Yang Yingliang Committed by Greg Kroah-Hartman

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: 15865124 ("staging: r8188eu: introduce new core dir for RTL8188eu driver")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210810125314.2182112-1-yangyingliang@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dcda94c9
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment