aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/neighbour.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r--net/core/neighbour.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 29dd8cc22bbf..510cd62fcb99 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2469,13 +2469,17 @@ int neigh_xmit(int index, struct net_device *dev,
2469 tbl = neigh_tables[index]; 2469 tbl = neigh_tables[index];
2470 if (!tbl) 2470 if (!tbl)
2471 goto out; 2471 goto out;
2472 rcu_read_lock_bh();
2472 neigh = __neigh_lookup_noref(tbl, addr, dev); 2473 neigh = __neigh_lookup_noref(tbl, addr, dev);
2473 if (!neigh) 2474 if (!neigh)
2474 neigh = __neigh_create(tbl, addr, dev, false); 2475 neigh = __neigh_create(tbl, addr, dev, false);
2475 err = PTR_ERR(neigh); 2476 err = PTR_ERR(neigh);
2476 if (IS_ERR(neigh)) 2477 if (IS_ERR(neigh)) {
2478 rcu_read_unlock_bh();
2477 goto out_kfree_skb; 2479 goto out_kfree_skb;
2480 }
2478 err = neigh->output(neigh, skb); 2481 err = neigh->output(neigh, skb);
2482 rcu_read_unlock_bh();
2479 } 2483 }
2480 else if (index == NEIGH_LINK_TABLE) { 2484 else if (index == NEIGH_LINK_TABLE) {
2481 err = dev_hard_header(skb, dev, ntohs(skb->protocol), 2485 err = dev_hard_header(skb, dev, ntohs(skb->protocol),