]> git.baikalelectronics.ru Git - kernel.git/commit
net: bridge: mcast: make sure querier port/address updates are consistent
authorNikolay Aleksandrov <nikolay@nvidia.com>
Fri, 13 Aug 2021 14:59:58 +0000 (17:59 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 14 Aug 2021 13:02:43 +0000 (14:02 +0100)
commitd5442ac7387c23bb4d4ef72a3343f103bfeca6d0
treed952086c92acb0e8b7b234d4e958f69868c7bc1c
parent37f9fd5c239d88c8b9341bae556a840cc5d4858f
net: bridge: mcast: make sure querier port/address updates are consistent

Use a sequence counter to make sure port/address updates can be read
consistently without requiring the bridge multicast_lock. We need to
zero out the port and address when the other querier has expired and
we're about to select ourselves as querier. br_multicast_read_querier
will be used later when dumping querier state. Updates are done only
with the multicast spinlock and softirqs disabled, while reads are done
from process context and from softirqs (due to notifications).

Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_multicast.c
net/bridge/br_private.h