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 <penguin-kernel@I-love.SAKURA.ne.jp>
Fixes: e624c58cf8 ("staging: wilc1000: refactor code to avoid use of wilc_set_multicast_list global")
Cc: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Adham Abozaeid <adham.abozaeid@microchip.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Tetsuo Handa 2019-04-07 21:58:43 +09:00 committed by Greg Kroah-Hartman
parent 8136eaa012
commit ae26aa8446
1 changed files with 1 additions and 1 deletions

View File

@ -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;