diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2019-02-16 02:48:09 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-18 00:51:46 +0100 |
commit | 3edaded89649d042ef4060cecc42f5599f3054b6 (patch) | |
tree | 182b39e81213c016cabdd03e913de1dbd8cfe220 /drivers/net/ethernet/sgi | |
parent | net: sched: sch_api: set an error msg when qdisc_alloc_handle() fails (diff) | |
download | linux-3edaded89649d042ef4060cecc42f5599f3054b6.tar.xz linux-3edaded89649d042ef4060cecc42f5599f3054b6.zip |
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: 8d4c28fbc284 ("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>
Diffstat (limited to 'drivers/net/ethernet/sgi')
-rw-r--r-- | drivers/net/ethernet/sgi/meth.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |