Commit ae26aa84 authored by Tetsuo Handa's avatar Tetsuo Handa Committed by Greg Kroah-Hartman

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: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Fixes: e624c58c ("staging: wilc1000: refactor code to avoid use of wilc_set_multicast_list global")
Cc: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: default avatarAdham Abozaeid <adham.abozaeid@microchip.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8136eaa0
...@@ -708,7 +708,7 @@ static void wilc_set_multicast_list(struct net_device *dev) ...@@ -708,7 +708,7 @@ static void wilc_set_multicast_list(struct net_device *dev)
return; 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) if (!mc_list)
return; 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