]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bridge: netlink: fix slave_changelink/br_setport race conditions
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Wed, 22 Jul 2015 11:03:40 +0000 (13:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Sep 2015 17:26:24 +0000 (19:26 +0200)
commit90ec7452b5804da4e0a0041e25c4ee74e06578db
tree74ab9c1e623cc0340b5b740d5c5f4d0fe9e61bb1
parent51677b722338da3671ef19846616cf3811253760
bridge: netlink: fix slave_changelink/br_setport race conditions

[ Upstream commit 963ad94853000ab100f5ff19eea80095660d41b4 ]

Since slave_changelink support was added there have been a few race
conditions when using br_setport() since some of the port functions it
uses require the bridge lock. It is very easy to trigger a lockup due to
some internal spin_lock() usage without bh disabled, also it's possible to
get the bridge into an inconsistent state.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Fixes: 3ac636b8591c ("bridge: implement rtnl_link_ops->slave_changelink")
Reviewed-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bridge/br_netlink.c