From: Wei Yongjun <weiyongjun1@huawei.com>
To: "David S . Miller" <davem@davemloft.net>,
Yang Wei <yang.wei9@zte.com.cn>,
Luis Chamberlain <mcgrof@kernel.org>,
YueHaibing <yuehaibing@huawei.com>,
Christoph Hellwig <hch@lst.de>
Cc: Wei Yongjun <weiyongjun1@huawei.com>, <netdev@vger.kernel.org>,
<kernel-janitors@vger.kernel.org>
Subject: [PATCH net-next] net: sgi: use GFP_ATOMIC under spin lock
Date: Sat, 16 Feb 2019 01:48:09 +0000 [thread overview]
Message-ID: <20190216014809.142801-1-weiyongjun1@huawei.com> (raw)
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;
next reply other threads:[~2019-02-16 1:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-16 1:48 Wei Yongjun [this message]
2019-02-17 23:52 ` [PATCH net-next] net: sgi: use GFP_ATOMIC under spin lock David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190216014809.142801-1-weiyongjun1@huawei.com \
--to=weiyongjun1@huawei.com \
--cc=davem@davemloft.net \
--cc=hch@lst.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yang.wei9@zte.com.cn \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).