diff options
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r-- | net/core/neighbour.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index decaa4b9db2f..53eab513955a 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -1429,15 +1429,11 @@ static inline struct neigh_parms *lookup_neigh_parms(struct neigh_table *tbl, | |||
1429 | struct neigh_parms *neigh_parms_alloc(struct net_device *dev, | 1429 | struct neigh_parms *neigh_parms_alloc(struct net_device *dev, |
1430 | struct neigh_table *tbl) | 1430 | struct neigh_table *tbl) |
1431 | { | 1431 | { |
1432 | struct neigh_parms *p, *ref; | 1432 | struct neigh_parms *p; |
1433 | struct net *net = dev_net(dev); | 1433 | struct net *net = dev_net(dev); |
1434 | const struct net_device_ops *ops = dev->netdev_ops; | 1434 | const struct net_device_ops *ops = dev->netdev_ops; |
1435 | 1435 | ||
1436 | ref = lookup_neigh_parms(tbl, net, 0); | 1436 | p = kmemdup(&tbl->parms, sizeof(*p), GFP_KERNEL); |
1437 | if (!ref) | ||
1438 | return NULL; | ||
1439 | |||
1440 | p = kmemdup(ref, sizeof(*p), GFP_KERNEL); | ||
1441 | if (p) { | 1437 | if (p) { |
1442 | p->tbl = tbl; | 1438 | p->tbl = tbl; |
1443 | atomic_set(&p->refcnt, 1); | 1439 | atomic_set(&p->refcnt, 1); |