Commit 6e695409 authored by Eric Dumazet's avatar Eric Dumazet Committed by Greg Kroah-Hartman

bridge: fix br_multicast_query_expired() bug

[ Upstream commit 71d9f614 ]

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: 2cd41431 ("bridge: memorize and export selected IGMP/MLD querier port")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Acked-by: default avatarThadeu Lima de Souza Cascardo <cascardo@redhat.com>
Acked-by: default avatarLinus Lüssing <linus.luessing@c0d3.blue>
Cc: Linus Lüssing <linus.luessing@web.de>
Cc: Steinar H. Gunderson <sesse@samfundet.no>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f1e07e7e
...@@ -1821,7 +1821,7 @@ static void br_multicast_query_expired(struct net_bridge *br, ...@@ -1821,7 +1821,7 @@ static void br_multicast_query_expired(struct net_bridge *br,
if (query->startup_sent < br->multicast_startup_query_count) if (query->startup_sent < br->multicast_startup_query_count)
query->startup_sent++; query->startup_sent++;
RCU_INIT_POINTER(querier, NULL); RCU_INIT_POINTER(querier->port, NULL);
br_multicast_send_query(br, NULL, query); br_multicast_send_query(br, NULL, query);
spin_unlock(&br->multicast_lock); spin_unlock(&br->multicast_lock);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment