2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-16 17:23:55 +08:00

staging: wilc1000: Avoid GFP_KERNEL allocation from atomic context

txq_add_mgmt_pkt allocates memory while being called from atomic context
so needs to use GFP_ATOMIC

Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Adham Abozaeid 2019-04-16 23:17:07 +00:00 committed by Greg Kroah-Hartman
parent 6229fed9ee
commit 2e299cc969

View File

@ -316,7 +316,7 @@ int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer,
if (wilc->quit)
return 0;
tqe = kmalloc(sizeof(*tqe), GFP_KERNEL);
tqe = kmalloc(sizeof(*tqe), GFP_ATOMIC);
if (!tqe)
return 0;