aboutsummaryrefslogtreecommitdiff
path: root/net/core/neighbour.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-07-17 12:18:15 +0800
committerAlex Shi <alex.shi@linaro.org>2016-07-17 12:18:15 +0800
commitaa6b4960f4571ecc422a13b2490e91f5debb64a1 (patch)
tree6af6af9e4c02335f7aba6cbedf2fb386ecf0a359 /net/core/neighbour.c
parent841eac1df7144c7ecd70ad8ea5942f12a260e845 (diff)
parentbd06e78ba67a5ba3c2f8dbf8d0b4a68ddb0fdc05 (diff)
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
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 f18ae91b652e..769cece9b00b 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2467,13 +2467,17 @@ int neigh_xmit(int index, struct net_device *dev,
tbl = neigh_tables[index];
if (!tbl)
goto out;
+ rcu_read_lock_bh();
neigh = __neigh_lookup_noref(tbl, addr, dev);
if (!neigh)
neigh = __neigh_create(tbl, addr, dev, false);
err = PTR_ERR(neigh);
- if (IS_ERR(neigh))
+ if (IS_ERR(neigh)) {
+ rcu_read_unlock_bh();
goto out_kfree_skb;
+ }
err = neigh->output(neigh, skb);
+ rcu_read_unlock_bh();
}
else if (index == NEIGH_LINK_TABLE) {
err = dev_hard_header(skb, dev, ntohs(skb->protocol),