From patchwork Fri Sep 8 22:48:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 811856 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="pabj4FKp"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xpsts4045z9s8J for ; Sat, 9 Sep 2017 08:48:53 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757173AbdIHWsv (ORCPT ); Fri, 8 Sep 2017 18:48:51 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36431 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752952AbdIHWsu (ORCPT ); Fri, 8 Sep 2017 18:48:50 -0400 Received: by mail-pf0-f196.google.com with SMTP id f84so2035945pfj.3 for ; Fri, 08 Sep 2017 15:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=LsBKc5eitKc54IVyjlNHPJUqk23WT88OS4T1VZbzx0o=; b=pabj4FKpRK9kkv7+/t2yxlAG3p3PwLoXQJkr9N0SvoSOpuZFYm3UQPDra0Vh3Wyt54 CxtB+fV48mvrU70s8+qYFvYsZ1sxYBDKCXQ259NPKcS/22yia5bkfq0XkOH6uXEC1iv1 2Og3RO5WZunlEe2rlmHYdPU79QUfh+nsiponj07sLG3E3iJzvy+2f2NFqFrzI0DGGH0H lWtKOmN/lPZV6eyJj+DpbcAh+6jrEKVGGsyZiXZvPNlevczOBMrC7ybtinROVQfhYO3s tm7B36L3IqT2yVn/MDHWFYBRKdOJ4ODWKRJKqD9aH4yNwtn8QyuQiQb4FJFalJ/QUsiY drFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=LsBKc5eitKc54IVyjlNHPJUqk23WT88OS4T1VZbzx0o=; b=YNOLOKZvShgn3yWiFmMBuQgaBQfViQo+acocPQGL59S93GUmO27sTnHwRRsyD0fEA8 S9zrvDCuhS6ISxExrzG8ZV/+cLSrsessJfky2CqSMGlYxN3bRlvFocQpxUp85SoQaJe0 BmgGSGkpyj7bCRwieJH1r5Z4I2ToqBLGBW2ishUKn0nH0+c6EUAeRmBSw9RGZYztwlR/ f8Z9LcJfX8fourqOsQgQtnrnNYNRdu4FKxPWqUZ5Jg3d0oOXJo8NEFv0fdOEbZTWBNhB rTZOYzin4ECKc3XddCWXBw1bJHeEtTrGbrSAKPBNa/JSUZzmWOOd0j11ZsIYC6xP/BtK EUzg== X-Gm-Message-State: AHPjjUj5vM8NMbF63D9Dt/uIG/j1cig7948IzdBDEfeUaGzE8yOLF1Gq woLHdkIJxB4AyeQu X-Google-Smtp-Source: ADKCNb75+A3u2kgFUUavT0650bT3Inma6DHnDhBz+2Mn5uNkPNXpQaRny6/ZBUniRX7qHs7a/fMkDw== X-Received: by 10.99.126.84 with SMTP id o20mr4541438pgn.129.1504910929846; Fri, 08 Sep 2017 15:48:49 -0700 (PDT) Received: from ?IPv6:2620:15c:2c1:100:b157:a4c6:2921:1e29? ([2620:15c:2c1:100:b157:a4c6:2921:1e29]) by smtp.googlemail.com with ESMTPSA id p71sm5734596pfl.56.2017.09.08.15.48.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Sep 2017 15:48:47 -0700 (PDT) Message-ID: <1504910927.15310.105.camel@edumazet-glaptop3.roam.corp.google.com> Subject: [PATCH net] ipv6: fix typo in fib6_net_exit() From: Eric Dumazet To: Sabrina Dubroca , David Miller Cc: netdev@vger.kernel.org Date: Fri, 08 Sep 2017 15:48:47 -0700 In-Reply-To: <1504893592.15310.80.camel@edumazet-glaptop3.roam.corp.google.com> References: <204659713af1979c26b8defb2b52e1668b4e5aad.1504859062.git.sd@queasysnail.net> <1504893592.15310.80.camel@edumazet-glaptop3.roam.corp.google.com> X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Eric Dumazet IPv6 FIB should use FIB6_TABLE_HASHSZ, not FIB_TABLE_HASHSZ. Fixes: ba1cc08d9488 ("ipv6: fix memory leak with multiple tables during netns destruction") Signed-off-by: Eric Dumazet Acked-by: Sabrina Dubroca --- net/ipv6/ip6_fib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 8280172c806ca47c5ca4aef723d405a0a8d7df2a..e5308d7cbd75c4fb67861082382122d445cf5b74 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -2033,7 +2033,7 @@ static void fib6_net_exit(struct net *net) rt6_ifdown(net, NULL); del_timer_sync(&net->ipv6.ip6_fib_timer); - for (i = 0; i < FIB_TABLE_HASHSZ; i++) { + for (i = 0; i < FIB6_TABLE_HASHSZ; i++) { struct hlist_head *head = &net->ipv6.fib_table_hash[i]; struct hlist_node *tmp; struct fib6_table *tb;