From: Tetsuo Handa Date: Sun, 7 Apr 2019 12:58:43 +0000 (+0900) Subject: staging: wilc1000: Avoid GFP_KERNEL allocation from atomic context. X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ae26aa844679cdf660e12c7055f958cb90889eb6;p=linux.git staging: wilc1000: Avoid GFP_KERNEL allocation from atomic context. Since wilc_set_multicast_list() is called with dev->addr_list_lock spinlock held, we can't use GFP_KERNEL memory allocation. Signed-off-by: Tetsuo Handa Fixes: e624c58cf8eb ("staging: wilc1000: refactor code to avoid use of wilc_set_multicast_list global") Cc: Ajay Singh Reviewed-by: Adham Abozaeid Cc: stable Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wilc1000/wilc_netdev.c b/drivers/staging/wilc1000/wilc_netdev.c index 1787154ee0882..ba78c08a17f12 100644 --- a/drivers/staging/wilc1000/wilc_netdev.c +++ b/drivers/staging/wilc1000/wilc_netdev.c @@ -708,7 +708,7 @@ static void wilc_set_multicast_list(struct net_device *dev) return; } - mc_list = kmalloc_array(dev->mc.count, ETH_ALEN, GFP_KERNEL); + mc_list = kmalloc_array(dev->mc.count, ETH_ALEN, GFP_ATOMIC); if (!mc_list) return;