netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] ndisc: Do not try to update "updated" time if neighbour has already gone.
@ 2013-01-21 19:58 YOSHIFUJI Hideaki
  2013-01-21 20:42 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: YOSHIFUJI Hideaki @ 2013-01-21 19:58 UTC (permalink / raw)
  To: davem; +Cc: yoshfuji, netdev, Dan Carpenter

Commit 2152caea ("ipv6: Do not depend on rt->n in rt6_probe().")
introduce a bug to try to update "updated" time in neighbour
structure.
Update the "updated" time only if neighbour is available.

Bug was found by Dan Carpenter <dan.carpenter@oracle.com>

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
---
 net/ipv6/route.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 2d94d5a..f3328bc 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -492,10 +492,10 @@ static void rt6_probe(struct rt6_info *rt)
 		struct in6_addr mcaddr;
 		struct in6_addr *target;
 
-		neigh->updated = jiffies;
-
-		if (neigh)
+		if (neigh) {
+			neigh->updated = jiffies;
 			write_unlock(&neigh->lock);
+		}
 
 		target = (struct in6_addr *)&rt->rt6i_gateway;
 		addrconf_addr_solict_mult(target, &mcaddr);
-- 
1.7.9.5

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

* Re: [PATCH net-next] ndisc: Do not try to update "updated" time if neighbour has already gone.
  2013-01-21 19:58 [PATCH net-next] ndisc: Do not try to update "updated" time if neighbour has already gone YOSHIFUJI Hideaki
@ 2013-01-21 20:42 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-01-21 20:42 UTC (permalink / raw)
  To: yoshfuji; +Cc: netdev, dan.carpenter

From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Date: Tue, 22 Jan 2013 04:58:50 +0900

> Commit 2152caea ("ipv6: Do not depend on rt->n in rt6_probe().")
> introduce a bug to try to update "updated" time in neighbour
> structure.
> Update the "updated" time only if neighbour is available.
> 
> Bug was found by Dan Carpenter <dan.carpenter@oracle.com>
> 
> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

Applied, thanks.

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

end of thread, other threads:[~2013-01-21 20:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-21 19:58 [PATCH net-next] ndisc: Do not try to update "updated" time if neighbour has already gone YOSHIFUJI Hideaki
2013-01-21 20:42 ` 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).