Hello!

In some kernel configs /proc functions seems to be accessed before the trie 
is initialized. The patch below checks for this.


Cheers.
                                        --ro


Signed-off-by: Robert Olsson <[EMAIL PROTECTED]>


--- linux-2.6.16-rc4/net/ipv4/fib_trie.c.orig   2006-02-21 22:21:36.000000000 
+0100
+++ linux-2.6.16-rc4/net/ipv4/fib_trie.c        2006-02-22 13:44:37.000000000 
+0100
@@ -50,7 +50,7 @@
  *             Patrick McHardy <[EMAIL PROTECTED]>
  */
 
-#define VERSION "0.404"
+#define VERSION "0.405"
 
 #include <linux/config.h>
 #include <asm/uaccess.h>
@@ -2040,7 +2040,15 @@
 static struct node *fib_trie_get_first(struct fib_trie_iter *iter,
                                       struct trie *t)
 {
-       struct node *n = rcu_dereference(t->trie);
+       struct node *n ;
+
+       if(!t)
+               return NULL;
+       
+       n = rcu_dereference(t->trie);
+
+       if(!iter)
+               return NULL;
 
        if (n && IS_TNODE(n)) {
                iter->tnode = (struct tnode *) n;
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to