netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] bridge: fix br_multicast_query_expired() bug
@ 2015-05-28 11:42 Eric Dumazet
  2015-05-28 12:06 ` Thadeu Lima de Souza Cascardo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Eric Dumazet @ 2015-05-28 11:42 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, Linus Lüssing, Steinar H. Gunderson,
	Stephen Hemminger, bridge

From: Eric Dumazet <edumazet@google.com>

br_multicast_query_expired() querier argument is a pointer to
a struct bridge_mcast_querier :

struct bridge_mcast_querier {
        struct br_ip addr;
        struct net_bridge_port __rcu    *port;
};

Intent of the code was to clear port field, not the pointer to querier.

Fixes: 2cd4143192e8 ("bridge: memorize and export selected IGMP/MLD querier port")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Linus Lüssing <linus.luessing@web.de>
Cc: Steinar H. Gunderson <sesse@samfundet.no>
---
 net/bridge/br_multicast.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index a3abe6ed111e..22fd0419b314 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1822,7 +1822,7 @@ static void br_multicast_query_expired(struct net_bridge *br,
 	if (query->startup_sent < br->multicast_startup_query_count)
 		query->startup_sent++;
 
-	RCU_INIT_POINTER(querier, NULL);
+	RCU_INIT_POINTER(querier->port, NULL);
 	br_multicast_send_query(br, NULL, query);
 	spin_unlock(&br->multicast_lock);
 }

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

* Re: [PATCH net] bridge: fix br_multicast_query_expired() bug
  2015-05-28 11:42 [PATCH net] bridge: fix br_multicast_query_expired() bug Eric Dumazet
@ 2015-05-28 12:06 ` Thadeu Lima de Souza Cascardo
  2015-05-28 16:42 ` Linus Lüssing
  2015-05-31  6:33 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2015-05-28 12:06 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Steinar H. Gunderson, netdev, bridge, Linus Lüssing,
	David Miller

On Thu, May 28, 2015 at 04:42:54AM -0700, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
> 
> br_multicast_query_expired() querier argument is a pointer to
> a struct bridge_mcast_querier :
> 
> struct bridge_mcast_querier {
>         struct br_ip addr;
>         struct net_bridge_port __rcu    *port;
> };
> 
> Intent of the code was to clear port field, not the pointer to querier.
> 
> Fixes: 2cd4143192e8 ("bridge: memorize and export selected IGMP/MLD querier port")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Linus Lüssing <linus.luessing@web.de>
> Cc: Steinar H. Gunderson <sesse@samfundet.no>
> ---
>  net/bridge/br_multicast.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
> index a3abe6ed111e..22fd0419b314 100644
> --- a/net/bridge/br_multicast.c
> +++ b/net/bridge/br_multicast.c
> @@ -1822,7 +1822,7 @@ static void br_multicast_query_expired(struct net_bridge *br,
>  	if (query->startup_sent < br->multicast_startup_query_count)
>  		query->startup_sent++;
>  
> -	RCU_INIT_POINTER(querier, NULL);
> +	RCU_INIT_POINTER(querier->port, NULL);
>  	br_multicast_send_query(br, NULL, query);
>  	spin_unlock(&br->multicast_lock);
>  }
> 
> 
> 
> --

Acked-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>

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

* Re: [PATCH net] bridge: fix br_multicast_query_expired() bug
  2015-05-28 11:42 [PATCH net] bridge: fix br_multicast_query_expired() bug Eric Dumazet
  2015-05-28 12:06 ` Thadeu Lima de Souza Cascardo
@ 2015-05-28 16:42 ` Linus Lüssing
  2015-05-31  6:33 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Linus Lüssing @ 2015-05-28 16:42 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: David Miller, netdev, Linus Lüssing, Steinar H. Gunderson,
	Stephen Hemminger, bridge

On Thu, May 28, 2015 at 04:42:54AM -0700, Eric Dumazet wrote:
> Intent of the code was to clear port field, not the pointer to querier.

Acked-by: Linus Lüssing <linus.luessing@c0d3.blue>

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

* Re: [PATCH net] bridge: fix br_multicast_query_expired() bug
  2015-05-28 11:42 [PATCH net] bridge: fix br_multicast_query_expired() bug Eric Dumazet
  2015-05-28 12:06 ` Thadeu Lima de Souza Cascardo
  2015-05-28 16:42 ` Linus Lüssing
@ 2015-05-31  6:33 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2015-05-31  6:33 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, linus.luessing, sesse, stephen, bridge

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 28 May 2015 04:42:54 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> br_multicast_query_expired() querier argument is a pointer to
> a struct bridge_mcast_querier :
> 
> struct bridge_mcast_querier {
>         struct br_ip addr;
>         struct net_bridge_port __rcu    *port;
> };
> 
> Intent of the code was to clear port field, not the pointer to querier.
> 
> Fixes: 2cd4143192e8 ("bridge: memorize and export selected IGMP/MLD querier port")
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied, thanks Eric.

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

end of thread, other threads:[~2015-05-31  6:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-28 11:42 [PATCH net] bridge: fix br_multicast_query_expired() bug Eric Dumazet
2015-05-28 12:06 ` Thadeu Lima de Souza Cascardo
2015-05-28 16:42 ` Linus Lüssing
2015-05-31  6:33 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).