From: Roy.Li Date: Mon, 3 Oct 2011 19:43:35 +0000 (+0000) Subject: ipv6: remove a rcu_read_lock in ndisc_constructor X-Git-Tag: MMI-PSA29.97-13-9~18247^2~96 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=01b7806cdce3d3cf1626a1e79389f30512703069;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ipv6: remove a rcu_read_lock in ndisc_constructor in6_dev_get(dev) takes a reference on struct inet6_dev, we dont need rcu locking in ndisc_constructor() Signed-off-by: Roy.Li Signed-off-by: David S. Miller --- diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 1f52dd257631..7968bfec6138 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -370,17 +370,14 @@ static int ndisc_constructor(struct neighbour *neigh) struct neigh_parms *parms; int is_multicast = ipv6_addr_is_multicast(addr); - rcu_read_lock(); in6_dev = in6_dev_get(dev); if (in6_dev == NULL) { - rcu_read_unlock(); return -EINVAL; } parms = in6_dev->nd_parms; __neigh_parms_put(neigh->parms); neigh->parms = neigh_parms_clone(parms); - rcu_read_unlock(); neigh->type = is_multicast ? RTN_MULTICAST : RTN_UNICAST; if (!dev->header_ops) {