diff options
| author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2019-04-07 21:58:43 +0900 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-11 07:49:53 +0200 |
| commit | 651832db87667f12d5ef57e22b48ee9eba921231 (patch) | |
| tree | f4366c21cd601f29fdfc3c30fa2c285bf9c18ea9 | |
| parent | f40de00d49fc01c9ae22405cb303e64d24626afe (diff) | |
| download | linux-651832db87667f12d5ef57e22b48ee9eba921231.tar.gz linux-651832db87667f12d5ef57e22b48ee9eba921231.tar.bz2 linux-651832db87667f12d5ef57e22b48ee9eba921231.zip | |
staging: wilc1000: Avoid GFP_KERNEL allocation from atomic context.
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>
| -rw-r--r-- | drivers/staging/wilc1000/wilc_netdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/wilc1000/wilc_netdev.c b/drivers/staging/wilc1000/wilc_netdev.c index 1787154ee088..ba78c08a17f1 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; |
