netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: sgi: use GFP_ATOMIC under spin lock
@ 2019-02-16  1:48 Wei Yongjun
  2019-02-17 23:52 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2019-02-16  1:48 UTC (permalink / raw)
  To: David S . Miller, Yang Wei, Luis Chamberlain, YueHaibing,
	Christoph Hellwig
  Cc: Wei Yongjun, netdev, kernel-janitors

The function meth_init_tx_ring() is called from meth_tx_timeout(),
in which spin_lock is held, so we should use GFP_ATOMIC instead.

Fixes: 8d4c28fbc284 ("meth: pass struct device to DMA API functions")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/ethernet/sgi/meth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/sgi/meth.c b/drivers/net/ethernet/sgi/meth.c
index f425ab528224..f1271402ca21 100644
--- a/drivers/net/ethernet/sgi/meth.c
+++ b/drivers/net/ethernet/sgi/meth.c
@@ -214,7 +214,7 @@ static int meth_init_tx_ring(struct meth_private *priv)
 {
 	/* Init TX ring */
 	priv->tx_ring = dma_alloc_coherent(&priv->pdev->dev,
-			TX_RING_BUFFER_SIZE, &priv->tx_ring_dma, GFP_KERNEL);
+			TX_RING_BUFFER_SIZE, &priv->tx_ring_dma, GFP_ATOMIC);
 	if (!priv->tx_ring)
 		return -ENOMEM;




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: sgi: use GFP_ATOMIC under spin lock
  2019-02-16  1:48 [PATCH net-next] net: sgi: use GFP_ATOMIC under spin lock Wei Yongjun
@ 2019-02-17 23:52 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-02-17 23:52 UTC (permalink / raw)
  To: weiyongjun1; +Cc: yang.wei9, mcgrof, yuehaibing, hch, netdev, kernel-janitors

From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Sat, 16 Feb 2019 01:48:09 +0000

> The function meth_init_tx_ring() is called from meth_tx_timeout(),
> in which spin_lock is held, so we should use GFP_ATOMIC instead.
> 
> Fixes: 8d4c28fbc284 ("meth: pass struct device to DMA API functions")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-17 23:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-16  1:48 [PATCH net-next] net: sgi: use GFP_ATOMIC under spin lock Wei Yongjun
2019-02-17 23:52 ` David Miller

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).