]> git.baikalelectronics.ru Git - kernel.git/commit
bridge: vlan: use proper rcu for the vlgrp member
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Mon, 12 Oct 2015 19:47:02 +0000 (21:47 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Oct 2015 11:57:52 +0000 (04:57 -0700)
commitf070cd4168d86c426e68ab0edfc249eca8f53521
treee3262a006fb576e8c4866bd6fc5483bd4734bd66
parent44c31850f26b67182a4a1ba54fe7e8e1b5a88270
bridge: vlan: use proper rcu for the vlgrp member

The bridge and port's vlgrp member is already used in RCU way, currently
we rely on the fact that it cannot disappear while the port exists but
that is error-prone and we might miss places with improper locking
(either RCU or RTNL must be held to walk the vlan_list). So make it
official and use RCU for vlgrp to catch offenders. Introduce proper vlgrp
accessors and use them consistently throughout the code.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_device.c
net/bridge/br_forward.c
net/bridge/br_input.c
net/bridge/br_netlink.c
net/bridge/br_private.h
net/bridge/br_vlan.c