2021-04-19 20:47:23

by Christophe JAILLET

[permalink] [raw]
Subject: [PATCH] brcmfmac: Avoid GFP_ATOMIC when GFP_KERNEL is enough

A workqueue is not atomic, so constraints can be relaxed here.
GFP_KERNEL can be used instead of GFP_ATOMIC.

Signed-off-by: Christophe JAILLET <[email protected]>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
index ea78fe527c5d..838b09b23abf 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
@@ -151,7 +151,7 @@ static void _brcmf_set_multicast_list(struct work_struct *work)
/* Send down the multicast list first. */
cnt = netdev_mc_count(ndev);
buflen = sizeof(cnt) + (cnt * ETH_ALEN);
- buf = kmalloc(buflen, GFP_ATOMIC);
+ buf = kmalloc(buflen, GFP_KERNEL);
if (!buf)
return;
bufp = buf;
--
2.27.0


2021-04-22 12:05:10

by Arend van Spriel

[permalink] [raw]
Subject: Re: [PATCH] brcmfmac: Avoid GFP_ATOMIC when GFP_KERNEL is enough

On 19-04-2021 21:35, Christophe JAILLET wrote:
> A workqueue is not atomic, so constraints can be relaxed here.
> GFP_KERNEL can be used instead of GFP_ATOMIC.

Acked-by: Arend van Spriel <[email protected]>
> Signed-off-by: Christophe JAILLET <[email protected]>
> ---
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

2021-04-22 14:42:42

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] brcmfmac: Avoid GFP_ATOMIC when GFP_KERNEL is enough

Christophe JAILLET <[email protected]> wrote:

> A workqueue is not atomic, so constraints can be relaxed here.
> GFP_KERNEL can be used instead of GFP_ATOMIC.
>
> Signed-off-by: Christophe JAILLET <[email protected]>
> Acked-by: Arend van Spriel <[email protected]>

Patch applied to wireless-drivers-next.git, thanks.

7a4fc7154e32 brcmfmac: Avoid GFP_ATOMIC when GFP_KERNEL is enough

--
https://patchwork.kernel.org/project/linux-wireless/patch/b6e619415db[email protected]wanadoo.fr/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches