lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20060829181936.GB1633@slug>
Date:	Tue, 29 Aug 2006 18:19:36 +0000
From:	Frederik Deweerdt <deweerdt@...e.fr>
To:	Valdis.Kletnieks@...edu
Cc:	Andrew Morton <akpm@...l.org>, linux-kernel@...r.kernel.org,
	vnuorval@....hut.fi, davem@...emloft.net
Subject: Re: 2.6.18-rc4-mm3: BUG: warning at include/net/dst.h:154/dst_release()

On Tue, Aug 29, 2006 at 10:25:07AM -0400, Valdis.Kletnieks@...edu wrote:
> Seeing this a lot on 2.6.18-rc4-mm3 with 2 different stack tracebacks
> (one for received packets, other for sending).  I already picked up the
> fix for the ^ / confusion in fib_rules.c and that didn't help matters.
> 
Hi,

I'm not familiary with net code, but willing to help :). It looks like
the fib6_rule_lookup function is increasing dst.__refcnt in one code
path and not the other. Does the (untested) attached patch help?

Thanks,
Frederik

diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index ee4aa43..12ec27b 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -67,8 +67,11 @@ struct dst_entry *fib6_rule_lookup(struc
 	if (arg.rule)
 		fib_rule_put(arg.rule);
 
-	if (arg.result)
-		return (struct dst_entry *) arg.result;
+	if (arg.result) {
+		struct dst_entry *dst = (struct dst_entry *)arg.result;
+		dst_hold(dst);
+		return dst;
+	}
 
 	dst_hold(&ip6_null_entry.u.dst);
 	return &ip6_null_entry.u.dst;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ