From patchwork Mon Jun 15 15:25:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarek Poplawski X-Patchwork-Id: 28698 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 B5724B712B for ; Tue, 16 Jun 2009 01:26:19 +1000 (EST) Received: by ozlabs.org (Postfix) id A7CC8DDD1B; Tue, 16 Jun 2009 01:26:19 +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 3BDD0DDD01 for ; Tue, 16 Jun 2009 01:26:19 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757170AbZFOP0M (ORCPT ); Mon, 15 Jun 2009 11:26:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761791AbZFOP0L (ORCPT ); Mon, 15 Jun 2009 11:26:11 -0400 Received: from mail-bw0-f213.google.com ([209.85.218.213]:40764 "EHLO mail-bw0-f213.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761390AbZFOP0J (ORCPT ); Mon, 15 Jun 2009 11:26:09 -0400 Received: by bwz9 with SMTP id 9so3409962bwz.37 for ; Mon, 15 Jun 2009 08:26:09 -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:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=3kjfEh/2JRk10ThLEb03KcvqUJAa6svKGjrrGPqHUSg=; b=hakVFqhMCA1HZadF/gaBwVrqwBJhBXZpTK2F5VgJt1w68jaXN9ChJu07OvHixlJQNE 0cTFVoWbk4tAV8InngLF45r1BR4TtmCZkcXlXt/tzh+Mv02m2J4KKiqyyomjSejpooqY Bk1nf4pQRwtg8J677E6x8HQTk8ljV/IuxIkPE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:in-reply-to:user-agent; b=qVn4XwIt2letohY1EaXAEGGXtmq76hJSO1jOq7giAP6miq/K0oZ3iGj2FkNJQnqm9E 1K1x/09fr8HdhyXHibsP6gkAoZ8+sHfSYuf7wecM0TrVMTiRdPbFSHm2fNWeaT6Hkh7U JFD2umyv74oP0KCIZboDA/X1uuxmGz1do9Vqo= Received: by 10.204.113.198 with SMTP id b6mr7145988bkq.115.1245079569158; Mon, 15 Jun 2009 08:26:09 -0700 (PDT) Received: from ami.dom.local ([79.162.131.0]) by mx.google.com with ESMTPS id 22sm8033670fkq.59.2009.06.15.08.26.06 (version=SSLv3 cipher=RC4-MD5); Mon, 15 Jun 2009 08:26:07 -0700 (PDT) Date: Mon, 15 Jun 2009 17:25:42 +0200 From: Jarek Poplawski To: David Miller Cc: Robert Olsson , Yan Zheng , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 2/1] Re: [BUG] fib_tries related Oops in 2.6.30 Message-ID: <20090615152542.GB2767@ami.dom.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20090615065333.GA4378@ff.dom.local> 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 ipv4: Fix fib_trie rebalancing, part 2 My previous patch, which explicitly delays freeing of tnodes by adding them to the list to flushe 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). Reported-by: Yan Zheng Signed-off-by: Jarek Poplawski --- net/ipv4/fib_trie.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) -- 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 --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index d1a39b1..64395b0 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c @@ -391,13 +391,8 @@ static inline void tnode_free(struct tnode *tn) static void tnode_free_safe(struct tnode *tn) { BUG_ON(IS_LEAF(tn)); - - if (node_parent((struct node *) tn)) { - tn->tnode_free = tnode_free_head; - tnode_free_head = tn; - } else { - tnode_free(tn); - } + tn->tnode_free = tnode_free_head; + tnode_free_head = tn; } static void tnode_free_flush(void)