aboutsummaryrefslogtreecommitdiff
path: root/net/core/neighbour.c
diff options
context:
space:
mode:
authorGuodong Xu <guodong.xu@linaro.org>2013-10-10 17:12:25 +0800
committerGuodong Xu <guodong.xu@linaro.org>2013-10-10 17:12:25 +0800
commit25e7bf7c19dbd730b742d799fd279c5b97cd5e0e (patch)
tree673904788e66afbe0be33e9c8d89f9b8a992f55e /net/core/neighbour.c
parentba94b768e206bc304329b5ee2fc86c46be11102b (diff)
parentdafe3258c5449e2697097285c37c761915053eae (diff)
Merge commit 'lsk-android-13.09' into integration-hilt-lsk-androidtest-lsk-1309test-lsk
* commit 'lsk-android-13.09': (95 commits) Linux 3.10.12 ARM: at91: dt: sam9260: add i2c gpio pinctrl mwifiex: do not create AP and P2P interfaces upon driver loading drivers/rtc/rtc-max77686.c: Fix wrong register crypto: xor - Check for osxsave as well as avx in crypto/xor net: mvneta: properly disable HW PHY polling and ensure adjust_link() works net: ipv6: tcp: fix potential use after free in tcp_v6_do_rcv ipv6: fix null pointer dereference in __ip6addrlbl_add vhost_net: poll vhost queue after marking DMA is done tg3: Don't turn off led on 5719 serdes port 0 ICMPv6: treat dest unreachable codes 5 and 6 as EACCES, not EPROTO net: bridge: convert MLDv2 Query MRC into msecs_to_jiffies for max_delay net: revert 8728c544a9c ("net: dev_pick_tx() fix") tipc: set sk_err correctly when connection fails tcp: tcp_make_synack() should use sock_wmalloc ipv6: Don't depend on per socket memory for neighbour discovery messages ipv4: sendto/hdrincl: don't use destination address found in header tcp: don't apply tsoffset if rcv_tsecr is zero tcp: initialize rcv_tstamp for restored sockets net: usb: Add HP hs2434 device to ZLP exception table ...
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r--net/core/neighbour.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index ce90b0264db5..0034b611fa5e 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1445,16 +1445,18 @@ struct neigh_parms *neigh_parms_alloc(struct net_device *dev,
atomic_set(&p->refcnt, 1);
p->reachable_time =
neigh_rand_reach_time(p->base_reachable_time);
+ dev_hold(dev);
+ p->dev = dev;
+ write_pnet(&p->net, hold_net(net));
+ p->sysctl_table = NULL;
if (ops->ndo_neigh_setup && ops->ndo_neigh_setup(dev, p)) {
+ release_net(net);
+ dev_put(dev);
kfree(p);
return NULL;
}
- dev_hold(dev);
- p->dev = dev;
- write_pnet(&p->net, hold_net(net));
- p->sysctl_table = NULL;
write_lock_bh(&tbl->lock);
p->next = tbl->parms.next;
tbl->parms.next = p;