netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Sparse Warnings: net/ipv6/route.c:521:17: sparse: context imbalance in 'rt6_probe' - different lock contexts for basic block
@ 2013-01-21 20:03 Peter Hüwe
  2013-01-21 20:48 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Hüwe @ 2013-01-21 20:03 UTC (permalink / raw)
  To: YOSHIFUJI Hideaki / 吉藤英明; +Cc: Fengguang Wu, netdev

Hi YOSHIFUJI,

FYI, there are new sparse warnings show up in

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
branch: master
head:   887c95cc1da53f66a5890fdeab13414613010097
commit: 2152caea719657579daa3a1a57a5425a3db6d612 [185/189] ipv6: Do not depend 
on rt->n in rt6_probe().

>> net/ipv6/route.c:521:17: sparse: context imbalance in 'rt6_probe' - 
different lock contexts for basic block

On latest net-next/master it's
net/ipv6/route.c:500:17: warning: context imbalance in 'rt6_probe' - different 
lock contexts for basic block


Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Reported-by: Peter Huewe <peterhuewe@gmx.de>


Thanks,
Peter

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

* Re: Sparse Warnings: net/ipv6/route.c:521:17: sparse: context imbalance in 'rt6_probe' - different lock contexts for basic block
  2013-01-21 20:03 Sparse Warnings: net/ipv6/route.c:521:17: sparse: context imbalance in 'rt6_probe' - different lock contexts for basic block Peter Hüwe
@ 2013-01-21 20:48 ` David Miller
  2013-01-21 20:56   ` Peter Hüwe
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2013-01-21 20:48 UTC (permalink / raw)
  To: PeterHuewe; +Cc: yoshfuji, fengguang.wu, netdev

From: Peter Hüwe <PeterHuewe@gmx.de>
Date: Mon, 21 Jan 2013 21:03:17 +0100

> Hi YOSHIFUJI,
> 
> FYI, there are new sparse warnings show up in
> 
> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
> branch: master
> head:   887c95cc1da53f66a5890fdeab13414613010097
> commit: 2152caea719657579daa3a1a57a5425a3db6d612 [185/189] ipv6: Do not depend 
> on rt->n in rt6_probe().
> 
>>> net/ipv6/route.c:521:17: sparse: context imbalance in 'rt6_probe' - 
> different lock contexts for basic block
> 
> On latest net-next/master it's
> net/ipv6/route.c:500:17: warning: context imbalance in 'rt6_probe' - different 
> lock contexts for basic block
> 
> 
> Reported-by: Fengguang Wu <fengguang.wu@intel.com>
> Reported-by: Peter Huewe <peterhuewe@gmx.de>

This is fixed by:

commit b820bb6b996966d93a5442b5fbf803ea58e7f487
Author: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Date:   Mon Jan 21 09:58:50 2013 +0000

    ndisc: Do not try to update "updated" time if neighbour has already gone.
    
    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>
    Signed-off-by: David S. Miller <davem@davemloft.net>

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);

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

* Re: Sparse Warnings: net/ipv6/route.c:521:17: sparse: context imbalance in 'rt6_probe' - different lock contexts for basic block
  2013-01-21 20:48 ` David Miller
@ 2013-01-21 20:56   ` Peter Hüwe
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Hüwe @ 2013-01-21 20:56 UTC (permalink / raw)
  To: David Miller; +Cc: yoshfuji, fengguang.wu, netdev

Hi David,
Am Montag, 21. Januar 2013, 21:48:03 schrieb David Miller:
> From: Peter Hüwe <PeterHuewe@gmx.de>
> Date: Mon, 21 Jan 2013 21:03:17 +0100
> 
> > Hi YOSHIFUJI,
> > 
> > FYI, there are new sparse warnings show up in
> > 
> > tree:   git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
> > branch: master
> > head:   887c95cc1da53f66a5890fdeab13414613010097
> > commit: 2152caea719657579daa3a1a57a5425a3db6d612 [185/189] ipv6: Do not
> > depend on rt->n in rt6_probe().
> > 
> >>> net/ipv6/route.c:521:17: sparse: context imbalance in 'rt6_probe' -
> > 
> > different lock contexts for basic block
> > 
> > On latest net-next/master it's
> > net/ipv6/route.c:500:17: warning: context imbalance in 'rt6_probe' -
> > different lock contexts for basic block
> > 
> > 
> > Reported-by: Fengguang Wu <fengguang.wu@intel.com>
> > Reported-by: Peter Huewe <peterhuewe@gmx.de>
> 
> This is fixed by:
> 
> commit b820bb6b996966d93a5442b5fbf803ea58e7f487
> Author: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
> Date:   Mon Jan 21 09:58:50 2013 +0000

Great! Thanks.
Wasn't online a few minutes ago when I checked, so sorry for the noise.
Sparse warning is gone.

Thanks
PeterH

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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-21 20:03 Sparse Warnings: net/ipv6/route.c:521:17: sparse: context imbalance in 'rt6_probe' - different lock contexts for basic block Peter Hüwe
2013-01-21 20:48 ` David Miller
2013-01-21 20:56   ` Peter Hüwe

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).