Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4136342pxb; Mon, 27 Sep 2021 10:07:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZZ2ql7nHW+yUD6mPebudDN/8k8zj1tAOByUWDAHanuLQmsSHSFqAY7NJTcDaM/HtOuh4S X-Received: by 2002:a17:903:1207:b0:138:e2f9:6c98 with SMTP id l7-20020a170903120700b00138e2f96c98mr934068plh.11.1632762452048; Mon, 27 Sep 2021 10:07:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632762452; cv=none; d=google.com; s=arc-20160816; b=qNnARY+fsswaZJsT/MqB14SbQX2o2S82a8qtYlsmG2II8n1j4dKgnvU5OhHCyVhKZE 1mmA6NZUh4AYhWYbKrZL9qHba3VnXpbcaPT9yqHP/TekBdEgI8DUHJUiOQ7oL8zj8o0l JZw8G89GkC6l+kf0M1oU7LD+GlBFtMj/iUSzELPyoUyBw7+gZ/LpmAKSVO6bclpbwklT g5BqxyDQKQrwHT3j0diBWufKweg/ui4+N1IxT94xN2Iw/eyFnYkZuEbwK21Gq6qSWoYP vHSTVIBcsRQeIwavk8IxjhQqAyowFxYhkiWZKZAbWNlnBBlH3BEHCsetScRvsJpxzYmU iwJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VbKzk7P6hKTpF7c7iGaGCLXtwJMZxyQq7cN2DcXVvn8=; b=CnaWkAfPIv7bp0K1EXnhXR3doYuOeaxJT+vbSJE+5uvuryBfy9C77/sxNkUGU+24x/ NsXQmI3CV3Fm2molqg4mHoJpYQOaTUfQc5t+XbT2sEw2jyGabaM78UApZAKuzDDosdiC 4LaHkGaCQLIHj/bMdfNnMikMsFyF/MuE0LKFmvz5SepVGC+fbFkaW877FHK6dXSTEviP qiV/2TLacvBX09QOxzlEKUHzx5zGronW5wBC/tzz8gi1Kr/XKAngQGTJz7bOVOgj7MRE jAQt6SGkEir71L5HYUi5swqPMBjvSgdapFf6Py+FCVsbfKCkexH+ga8wilvhRNJcXxth bmqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dD5H7FZI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q18si23255307plh.236.2021.09.27.10.07.19; Mon, 27 Sep 2021 10:07:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dD5H7FZI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235721AbhI0RH6 (ORCPT + 99 others); Mon, 27 Sep 2021 13:07:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:46936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235751AbhI0RHF (ORCPT ); Mon, 27 Sep 2021 13:07:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8BF9C6108E; Mon, 27 Sep 2021 17:05:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632762327; bh=EpjAQJTkFg02hqVpb6tB77wl0XF3AmrGDuxwoXv4M2Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dD5H7FZIizava8+VQ5Y2R4w1JyFQlFVu71gaxGGxhJ3v0I6DZyzTk3qW21PR1dUJA nLmlY/BP8UJ6S06GBEjFIH6dDigDmpNF4tG7kF9B/qgB+lFQPDYf6/943T5FI57Qrb Z46hdU5mYWYwJku/Aigx2uSfpcXR4J6cxwmIzYGI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, zhang kai , David Ahern , "David S. Miller" , Sasha Levin Subject: [PATCH 5.4 49/68] ipv6: delay fib6_sernum increase in fib6_add Date: Mon, 27 Sep 2021 19:02:45 +0200 Message-Id: <20210927170221.657140112@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210927170219.901812470@linuxfoundation.org> References: <20210927170219.901812470@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: zhang kai [ Upstream commit e87b5052271e39d62337ade531992b7e5d8c2cfa ] only increase fib6_sernum in net namespace after add fib6_info successfully. Signed-off-by: zhang kai Reviewed-by: David Ahern Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/ipv6/ip6_fib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index bb68290ad68d..9a6f66e0e9a2 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -1310,7 +1310,6 @@ int fib6_add(struct fib6_node *root, struct fib6_info *rt, int err = -ENOMEM; int allow_create = 1; int replace_required = 0; - int sernum = fib6_new_sernum(info->nl_net); if (info->nlh) { if (!(info->nlh->nlmsg_flags & NLM_F_CREATE)) @@ -1410,7 +1409,7 @@ int fib6_add(struct fib6_node *root, struct fib6_info *rt, if (!err) { if (rt->nh) list_add(&rt->nh_list, &rt->nh->f6i_list); - __fib6_update_sernum_upto_root(rt, sernum); + __fib6_update_sernum_upto_root(rt, fib6_new_sernum(info->nl_net)); fib6_start_gc(info->nl_net, rt); } -- 2.33.0