From patchwork Thu Jun 18 07:23:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarek Poplawski X-Patchwork-Id: 28846 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 7226EB7238 for ; Thu, 18 Jun 2009 17:23:47 +1000 (EST) Received: by ozlabs.org (Postfix) id 64598DDDA0; Thu, 18 Jun 2009 17:23:47 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id C5D5FDDD1C for ; Thu, 18 Jun 2009 17:23:46 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754008AbZFRHXI (ORCPT ); Thu, 18 Jun 2009 03:23:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752939AbZFRHXI (ORCPT ); Thu, 18 Jun 2009 03:23:08 -0400 Received: from mail-fx0-f212.google.com ([209.85.220.212]:37616 "EHLO mail-fx0-f212.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753497AbZFRHXF (ORCPT ); Thu, 18 Jun 2009 03:23:05 -0400 Received: by fxm8 with SMTP id 8so828630fxm.37 for ; Thu, 18 Jun 2009 00:23:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=slBASScN5mdzquhix6Og9M3eHjNtSAiD3SWOq2d/rGw=; b=rzYRVdkL1pt4EaxcLyfrkEfmX29gGxlp25rNUqkO1FFg4nowwLT4d42murjfmoq4C0 +NH/cr3tyaPcHoBq47uNtGLatWheFZZFA3zrB6c6e4gTqSvgjCCe/6sH4PUG9/z+z69e /s/6hRalHabBhkclr8gdNvf6CdyjFSD4QcsZc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=qb7yozVuF0FUxlL7GdX/4S9uAULtEK2RgmOkzrjUML9xkuwGiglM8dqxfJuoO5tn7Y QKS2BrbHffcObpAqDsUgwDMuOHdjv0nuMaSI09mNgSadLsXxlHFiM4QNeGMVwm2NtoN9 5pG58YkUQpicwsmcIUtQNxX2EIoY8ToLrMvQo= Received: by 10.103.247.14 with SMTP id z14mr783922mur.70.1245309786689; Thu, 18 Jun 2009 00:23:06 -0700 (PDT) Received: from ff.dom.local (bv170.internetdsl.tpnet.pl [80.53.205.170]) by mx.google.com with ESMTPS id 12sm213185muq.23.2009.06.18.00.23.04 (version=SSLv3 cipher=RC4-MD5); Thu, 18 Jun 2009 00:23:05 -0700 (PDT) Date: Thu, 18 Jun 2009 07:23:00 +0000 From: Jarek Poplawski To: David Miller Cc: robert.olsson@its.uu.se, zheng.yan@oracle.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 3/1] Re: [BUG] fib_tries related Oops in 2.6.30 Message-ID: <20090618072300.GA6243@ff.dom.local> References: <20090615065333.GA4378@ff.dom.local> <20090615160800.GC2767@ami.dom.local> <20090617.185658.226201750.davem@davemloft.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20090617.185658.226201750.davem@davemloft.net> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Jun 17, 2009 at 06:56:58PM -0700, David Miller wrote: > From: Jarek Poplawski > Date: Mon, 15 Jun 2009 18:08:01 +0200 > > > ipv4: Fix fib_trie rebalancing, part 2 > > > > My previous patch, which explicitly delays freeing of tnodes by adding > > them to the list to flush them after the update is finished, isn't > > strict enough. It treats exceptionally tnodes without parent, assuming > > they are newly created, so "invisible" for the read side yet. > > > > But the top tnode doesn't have parent as well, so we have to exclude > > all exceptions (at least until a better way is found). Additionally we > > need to move rcu assignment of this node before flushing, so the > > return type of the trie_rebalance() function is changed. > > > > Reported-by: Yan Zheng > > Signed-off-by: Jarek Poplawski > > Applied, thanks a lot Jarek. Not at all, really :-( I definitely need more time to find out what's going on here... Sorry/thanks x2, Jarek P. ------------------> ipv4: Fix fib_trie rebalancing, part 3 Alas my fix, part 2, has one if too much again... (We can't repeat the same test because tn is different.) Reported-by: Yan Zheng Signed-off-by: Jarek Poplawski --- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff -Nurp a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c --- a/net/ipv4/fib_trie.c 2009-06-18 06:53:24.000000000 +0000 +++ b/net/ipv4/fib_trie.c 2009-06-18 06:58:00.000000000 +0000 @@ -1032,8 +1032,7 @@ static void trie_rebalance(struct trie * tn = (struct tnode *)resize(t, (struct tnode *)tn); rcu_assign_pointer(t->trie, (struct node *)tn); - if (IS_TNODE(tn)) - tnode_free_flush(); + tnode_free_flush(); return; }