mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-24 11:34:50 +08:00
net: fec: Avoid allocating rx buffer using ATOMIC in ndo_open
Make ndo_open less sensitive to memory pressure. Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/r/20220518062007.10056-1-michael@amarulasolutions.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
d935053a62
commit
b885aab3d3
@ -3076,7 +3076,7 @@ fec_enet_alloc_rxq_buffers(struct net_device *ndev, unsigned int queue)
|
||||
rxq = fep->rx_queue[queue];
|
||||
bdp = rxq->bd.base;
|
||||
for (i = 0; i < rxq->bd.ring_size; i++) {
|
||||
skb = netdev_alloc_skb(ndev, FEC_ENET_RX_FRSIZE);
|
||||
skb = __netdev_alloc_skb(ndev, FEC_ENET_RX_FRSIZE, GFP_KERNEL);
|
||||
if (!skb)
|
||||
goto err_alloc;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user