Message ID | 1496213436-33961-1-git-send-email-roopa@cumulusnetworks.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
On 5/31/17 12:50 AM, Roopa Prabhu wrote: > From: Roopa Prabhu <roopa@cumulusnetworks.com> > > 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> > --- > net/mpls/af_mpls.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: David Ahern <dsahern@gmail.com>
From: Roopa Prabhu <roopa@cumulusnetworks.com> Date: Tue, 30 May 2017 23:50:36 -0700 > From: Roopa Prabhu <roopa@cumulusnetworks.com> > > 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> Applied, thanks.
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c index 94b3317..b51582d 100644 --- a/net/mpls/af_mpls.c +++ b/net/mpls/af_mpls.c @@ -1483,7 +1483,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);