* [PATCH 1/2] ipw2100: Use GFP_KERNEL instead of GFP_ATOMIC in some memory allocation
@ 2020-07-22 10:17 Christophe JAILLET
2020-08-02 15:19 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2020-07-22 10:17 UTC (permalink / raw)
To: stas.yakovlev, kvalo, davem, kuba
Cc: linux-wireless, netdev, linux-kernel, kernel-janitors,
Christophe JAILLET
The call chain is:
ipw2100_pci_init_one (the probe function)
--> ipw2100_queues_allocate
--> ipw2100_tx_allocate
No lock is taken in the between.
So it is safe to use GFP_KERNEL in 'ipw2100_tx_allocate()'.
BTW, 'ipw2100_queues_allocate()' also calls 'ipw2100_msg_allocate()' which
already allocates some memory using GFP_KERNEL.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/net/wireless/intel/ipw2x00/ipw2100.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
index 83d2f2acc0de..699deca745a2 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
@@ -4430,7 +4430,7 @@ static int ipw2100_tx_allocate(struct ipw2100_priv *priv)
priv->tx_buffers = kmalloc_array(TX_PENDED_QUEUE_LENGTH,
sizeof(struct ipw2100_tx_packet),
- GFP_ATOMIC);
+ GFP_KERNEL);
if (!priv->tx_buffers) {
bd_queue_free(priv, &priv->tx_queue);
return -ENOMEM;
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] ipw2100: Use GFP_KERNEL instead of GFP_ATOMIC in some memory allocation
2020-07-22 10:17 [PATCH 1/2] ipw2100: Use GFP_KERNEL instead of GFP_ATOMIC in some memory allocation Christophe JAILLET
@ 2020-08-02 15:19 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2020-08-02 15:19 UTC (permalink / raw)
To: Christophe JAILLET
Cc: stas.yakovlev, davem, kuba, linux-wireless, netdev, linux-kernel,
kernel-janitors, Christophe JAILLET
Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:
> The call chain is:
> ipw2100_pci_init_one (the probe function)
> --> ipw2100_queues_allocate
> --> ipw2100_tx_allocate
>
> No lock is taken in the between.
> So it is safe to use GFP_KERNEL in 'ipw2100_tx_allocate()'.
>
> BTW, 'ipw2100_queues_allocate()' also calls 'ipw2100_msg_allocate()' which
> already allocates some memory using GFP_KERNEL.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
2 patches applied to wireless-drivers-next.git, thanks.
9130559cf8db ipw2100: Use GFP_KERNEL instead of GFP_ATOMIC in some memory allocation
e52525c0c320 ipw2x00: switch from 'pci_' to 'dma_' API
--
https://patchwork.kernel.org/patch/11678101/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-02 15:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22 10:17 [PATCH 1/2] ipw2100: Use GFP_KERNEL instead of GFP_ATOMIC in some memory allocation Christophe JAILLET
2020-08-02 15:19 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).