]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
staging: wilc1000: Avoid GFP_KERNEL allocation from atomic context.
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Sun, 7 Apr 2019 12:58:43 +0000 (21:58 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 May 2019 16:36:04 +0000 (18:36 +0200)
commit ae26aa844679cdf660e12c7055f958cb90889eb6 upstream.

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: e624c58cf8eb ("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>
drivers/staging/wilc1000/linux_wlan.c

index 5e5149c9a92d994eef327806b7df2ac5cd24f866..2448805315c595fb3002e06e578d1a5e399aa313 100644 (file)
@@ -816,7 +816,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;