From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: zhang kai <zhangkaiheb@126.com>, David Ahern <dsahern@kernel.org>,
"David S . Miller" <davem@davemloft.net>,
Sasha Levin <sashal@kernel.org>,
yoshfuji@linux-ipv6.org, kuba@kernel.org, netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 5.10 07/26] ipv6: delay fib6_sernum increase in fib6_add
Date: Wed, 22 Sep 2021 23:38:20 -0400 [thread overview]
Message-ID: <20210923033839.1421034-7-sashal@kernel.org> (raw)
In-Reply-To: <20210923033839.1421034-1-sashal@kernel.org>
From: zhang kai <zhangkaiheb@126.com>
[ Upstream commit e87b5052271e39d62337ade531992b7e5d8c2cfa ]
only increase fib6_sernum in net namespace after add fib6_info
successfully.
Signed-off-by: zhang kai <zhangkaiheb@126.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
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 1fb79dbde0cb..e43f1fbac28b 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -1376,7 +1376,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))
@@ -1476,7 +1475,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.30.2
next prev parent reply other threads:[~2021-09-23 3:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-23 3:38 [PATCH AUTOSEL 5.10 01/26] ibmvnic: check failover_pending in login response Sasha Levin
2021-09-23 3:38 ` [PATCH AUTOSEL 5.10 02/26] net: phylink: Update SFP selected interface on advertising changes Sasha Levin
2021-09-23 3:38 ` [PATCH AUTOSEL 5.10 03/26] net: macb: fix use after free on rmmod Sasha Levin
2021-09-23 3:38 ` [PATCH AUTOSEL 5.10 04/26] net: stmmac: allow CSR clock of 300MHz Sasha Levin
2021-09-23 3:38 ` [PATCH AUTOSEL 5.10 05/26] blk-mq: avoid to iterate over stale request Sasha Levin
2021-09-23 3:38 ` [PATCH AUTOSEL 5.10 06/26] m68k: Double cast io functions to unsigned long Sasha Levin
2021-09-23 3:38 ` Sasha Levin [this message]
2021-09-23 7:33 ` [PATCH AUTOSEL 5.10 01/26] ibmvnic: check failover_pending in login response Pavel Machek
2021-09-24 11:47 ` Sasha Levin
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=20210923033839.1421034-7-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
--cc=zhangkaiheb@126.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox