mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-19 08:16:12 +07:00
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: 8d4c28fbc2
("meth: pass struct device to DMA API functions")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
aaeb1dea51
commit
3edaded896
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user