summaryrefslogtreecommitdiff
path: root/net/smc
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2022-02-06 06:33:48 -0800
committerDavid S. Miller <davem@davemloft.net>2022-02-07 12:02:49 +0000
commit94fdd7c02a56d0316d20e417a1141b71a8dcee82 (patch)
tree24de34dc15ce91d972e07adcd5c4a029f03c54b9 /net/smc
parent28f9222138868899c53e00bc1f910faa55f88546 (diff)
net/smc: use GFP_ATOMIC allocation in smc_pnet_add_eth()
My last patch moved the netdev_tracker_alloc() call to a section protected by a write_lock(). I should have replaced GFP_KERNEL with GFP_ATOMIC to avoid the infamous: BUG: sleeping function called from invalid context at include/linux/sched/mm.h:256 Fixes: 28f922213886 ("net/smc: fix ref_tracker issue in smc_pnet_add()") Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc')
-rw-r--r--net/smc/smc_pnet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/smc/smc_pnet.c b/net/smc/smc_pnet.c
index fb6331d97185..0599246c0376 100644
--- a/net/smc/smc_pnet.c
+++ b/net/smc/smc_pnet.c
@@ -382,7 +382,7 @@ static int smc_pnet_add_eth(struct smc_pnettable *pnettable, struct net *net,
if (ndev) {
new_pe->ndev = ndev;
netdev_tracker_alloc(ndev, &new_pe->dev_tracker,
- GFP_KERNEL);
+ GFP_ATOMIC);
}
list_add_tail(&new_pe->list, &pnettable->pnetlist);
write_unlock(&pnettable->lock);