netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [TRIVIAL] Fix recent bug in fib_semantics.c
@ 2004-09-17  6:20 David Gibson
  2004-09-17  6:37 ` Jeff Garzik
  2004-09-17 18:27 ` David S. Miller
  0 siblings, 2 replies; 12+ messages in thread
From: David Gibson @ 2004-09-17  6:20 UTC (permalink / raw)
  To: Andrew Morton; +Cc: David Miller, trivial, linux-kernel, netdev

Andrew, please apply:

When fib_create_info() allocates new hash tables, it neglects to
initialize them.  This leads to an oops during boot on at least
machine I use.  This patch addresses the problem.

Signed-off-by: David Gibson <dwg@au1.ibm.com>

Index: working-2.6/net/ipv4/fib_semantics.c
===================================================================
--- working-2.6.orig/net/ipv4/fib_semantics.c	2004-09-17 09:20:04.000000000 +1000
+++ working-2.6/net/ipv4/fib_semantics.c	2004-09-17 16:24:42.634638304 +1000
@@ -604,8 +604,12 @@
 		if (!new_info_hash || !new_laddrhash) {
 			fib_hash_free(new_info_hash, bytes);
 			fib_hash_free(new_laddrhash, bytes);
-		} else
+		} else {
+			memset(new_info_hash, 0, bytes);
+			memset(new_laddrhash, 0, bytes);
+
 			fib_hash_move(new_info_hash, new_laddrhash, new_size);
+		}
 
 		if (!fib_hash_size)
 			goto failure;



-- 
David Gibson			| For every complex problem there is a
david AT gibson.dropbear.id.au	| solution which is simple, neat and
				| wrong.
http://www.ozlabs.org/people/dgibson

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

end of thread, other threads:[~2004-09-18 20:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-17  6:20 [TRIVIAL] Fix recent bug in fib_semantics.c David Gibson
2004-09-17  6:37 ` Jeff Garzik
2004-09-17 18:27 ` David S. Miller
2004-09-18  0:21   ` Jon Smirl
2004-09-18  0:27     ` Herbert Xu
2004-09-18  0:59       ` Jon Smirl
2004-09-18  1:37       ` Jon Smirl
2004-09-18  4:16         ` Herbert Xu
2004-09-18  5:22           ` Jon Smirl
2004-09-18  6:31           ` David S. Miller
2004-09-18 15:28             ` Jon Smirl
2004-09-18 20:31             ` jamal

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