netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] ipv6: remove a rcu_read_lock in ndisc_constructor
@ 2011-10-04  5:43 rongqing.li
  2011-10-17 23:28 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: rongqing.li @ 2011-10-04  5:43 UTC (permalink / raw)
  To: netdev

From: Roy.Li <rongqing.li@windriver.com>

in6_dev_get(dev) takes a reference on struct inet6_dev, we dont need
rcu locking in ndisc_constructor()

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
---
 net/ipv6/ndisc.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 9da6e02..dd633ff 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) {
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] ipv6: remove a rcu_read_lock in ndisc_constructor
  2011-10-04  5:43 [PATCH net-next] ipv6: remove a rcu_read_lock in ndisc_constructor rongqing.li
@ 2011-10-17 23:28 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-10-17 23:28 UTC (permalink / raw)
  To: rongqing.li; +Cc: netdev

From: <rongqing.li@windriver.com>
Date: Tue, 4 Oct 2011 13:43:35 +0800

> From: Roy.Li <rongqing.li@windriver.com>
> 
> in6_dev_get(dev) takes a reference on struct inet6_dev, we dont need
> rcu locking in ndisc_constructor()
> 
> Signed-off-by: Roy.Li <rongqing.li@windriver.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-17 23:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-04  5:43 [PATCH net-next] ipv6: remove a rcu_read_lock in ndisc_constructor rongqing.li
2011-10-17 23:28 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).