]> git.baikalelectronics.ru Git - kernel.git/commit
bridge: fix bridge netlink RCU usage
authorJohannes Berg <johannes.berg@intel.com>
Tue, 3 Mar 2015 15:02:16 +0000 (16:02 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Mar 2015 05:20:22 +0000 (00:20 -0500)
commit8a30d1d40c46ba29a52fbf39e0e49024b47d216f
tree8f9f700566913bc2e0bc09d00ecee9eac492f31e
parent97e62b88228cf71e98e58f4d1cfd2803f42967b1
bridge: fix bridge netlink RCU usage

When the STP timer fires, it can call br_ifinfo_notify(),
which in turn ends up in the new br_get_link_af_size().
This function is annotated to be using RTNL locking, which
clearly isn't the case here, and thus lockdep warns:

  ===============================
  [ INFO: suspicious RCU usage. ]
  3.19.0+ #569 Not tainted
  -------------------------------
  net/bridge/br_private.h:204 suspicious rcu_dereference_protected() usage!

Fix this by doing RCU locking here.

Fixes: d0fa6e40717d ("bridge: add vlan info to bridge setlink and dellink notification messages")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_netlink.c