All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@gmail.com>
To: Robert Olsson <robert.olsson@its.uu.se>
Cc: Yan Zheng <zheng.yan@oracle.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [BUG] fib_tries related Oops in 2.6.30
Date: Fri, 12 Jun 2009 09:25:58 +0200	[thread overview]
Message-ID: <20090612072557.GA2761@ami.dom.local> (raw)
In-Reply-To: <4A31173D.6010504@gmail.com>

Jarek Poplawski wrote, On 06/11/2009 04:39 PM:

> Cc Robert Olsson.
> 
> Jarek P.
> 
> Yan Zheng wrote, On 06/10/2009 06:05 PM:
> 
>> Hello,
>>
>> I pull linux-2.6.30 from linus-2.6 git tree. I got following oops
>> immediately after boot.
>>
>> # uname -a
>> Linux zhyan-cn 2.6.30 #1 SMP PREEMPT Wed Jun 10 23:37:22 CST 2009 i686
>> i686 i386 GNU/Linux
>>
>> ---
>> BUG: sleeping function called from invalid context at
...

Robert, probably I miss something, but since I don't understand this
last patch with preempt_disable(), I've looked a bit at this place and
found this parent update after IMHO possible child destruction quite
suspicious, so I wonder if you could check if this patch could change
anything with previous oops. (It's mainly to test the idea, not to
optimally fix it.)

Thanks,
Jarek P.
---

 net/ipv4/fib_trie.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 538d2a9..565fc1d 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -989,16 +989,17 @@ static struct node *trie_rebalance(struct trie *t, struct tnode *tn)
 	t_key cindex, key;
 	struct tnode *tp;
 
-	preempt_disable();
 	key = tn->key;
 
 	while (tn != NULL && (tp = node_parent((struct node *)tn)) != NULL) {
 		cindex = tkey_extract_bits(key, tp->pos, tp->bits);
 		wasfull = tnode_full(tp, tnode_get_child(tp, cindex));
+		tnode_put_child_reorg((struct tnode *)tp, cindex, NULL,
+				      wasfull);
 		tn = (struct tnode *) resize(t, (struct tnode *)tn);
 
 		tnode_put_child_reorg((struct tnode *)tp, cindex,
-				      (struct node *)tn, wasfull);
+				      (struct node *)tn, -1);
 
 		tp = node_parent((struct node *) tn);
 		if (!tp)
@@ -1010,7 +1011,6 @@ static struct node *trie_rebalance(struct trie *t, struct tnode *tn)
 	if (IS_TNODE(tn))
 		tn = (struct tnode *)resize(t, (struct tnode *)tn);
 
-	preempt_enable();
 	return (struct node *)tn;
 }
 

  reply	other threads:[~2009-06-12  7:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-10 16:05 [BUG] fib_tries related Oops in 2.6.30 Yan Zheng
2009-06-11 14:39 ` Jarek Poplawski
2009-06-12  7:25   ` Jarek Poplawski [this message]
2009-06-15  6:53     ` [PATCH] " Jarek Poplawski
2009-06-15  9:32       ` David Miller
2009-06-15 15:25       ` [PATCH 2/1] " Jarek Poplawski
2009-06-15 16:08       ` [PATCH 2/1 v2] " Jarek Poplawski
2009-06-18  1:56         ` David Miller
2009-06-18  7:23           ` [PATCH 3/1] " Jarek Poplawski
2009-06-18  7:26             ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090612072557.GA2761@ami.dom.local \
    --to=jarkao2@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=robert.olsson@its.uu.se \
    --cc=zheng.yan@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.