提交 3edaded8 编写于 作者: W Wei Yongjun 提交者: David S. Miller

net: sgi: use GFP_ATOMIC under spin lock

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: 8d4c28fb ("meth: pass struct device to DMA API functions")
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 aaeb1dea
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册