All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] mpls: fix clearing of dead nh_flags on link up
@ 2017-05-31  6:50 Roopa Prabhu
  2017-05-31 11:18 ` David Ahern
  2017-05-31 18:48 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Roopa Prabhu @ 2017-05-31  6:50 UTC (permalink / raw)
  To: davem; +Cc: netdev, dsahern

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(-)

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);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] mpls: fix clearing of dead nh_flags on link up
  2017-05-31  6:50 [PATCH net] mpls: fix clearing of dead nh_flags on link up Roopa Prabhu
@ 2017-05-31 11:18 ` David Ahern
  2017-05-31 18:48 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Ahern @ 2017-05-31 11:18 UTC (permalink / raw)
  To: Roopa Prabhu, davem; +Cc: netdev

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] mpls: fix clearing of dead nh_flags on link up
  2017-05-31  6:50 [PATCH net] mpls: fix clearing of dead nh_flags on link up Roopa Prabhu
  2017-05-31 11:18 ` David Ahern
@ 2017-05-31 18:48 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-05-31 18:48 UTC (permalink / raw)
  To: roopa; +Cc: netdev, dsahern

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-31 18:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-31  6:50 [PATCH net] mpls: fix clearing of dead nh_flags on link up Roopa Prabhu
2017-05-31 11:18 ` David Ahern
2017-05-31 18:48 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.