diff options
author | Roopa Prabhu <roopa@cumulusnetworks.com> | 2017-05-31 08:50:36 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-31 20:48:24 +0200 |
commit | c2e8471d98f072f0f18acdd7df5b401ed0d29a2c (patch) | |
tree | 85255531c646af1ed823f1665a7fc091484ca100 /net | |
parent | isdn: Fix a sleep-in-atomic bug (diff) | |
download | linux-c2e8471d98f072f0f18acdd7df5b401ed0d29a2c.tar.xz linux-c2e8471d98f072f0f18acdd7df5b401ed0d29a2c.zip |
mpls: fix clearing of dead nh_flags on link up
recent fixes to use WRITE_ONCE for nh_flags on link up,
accidently ended up leaving the deadflags on a nh. This patch
fixes the WRITE_ONCE to use freshly evaluated nh_flags.
Fixes: 39eb8cd17588 ("net: mpls: rt_nhn_alive and nh_flags should be accessed using READ_ONCE")
Reported-by: Satish Ashok <sashok@cumulusnetworks.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/mpls/af_mpls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c index 257ec66009da..7b05fd1497ce 100644 --- a/net/mpls/af_mpls.c +++ b/net/mpls/af_mpls.c @@ -1418,7 +1418,7 @@ static void mpls_ifup(struct net_device *dev, unsigned int flags) continue; alive++; nh_flags &= ~flags; - WRITE_ONCE(nh->nh_flags, flags); + WRITE_ONCE(nh->nh_flags, nh_flags); } endfor_nexthops(rt); WRITE_ONCE(rt->rt_nhn_alive, alive); |