[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 03 Mar 2015 14:33:44 +0100
From: Johannes Berg <johannes@...solutions.net>
To: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Cc: Roopa Prabhu <roopa@...ulusnetworks.com>,
Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [PATCH] bridge: fix bridge netlink RCU usage
On Tue, 2015-03-03 at 13:29 +0000, Johannes Berg wrote:
> @@ -26,12 +26,15 @@ static size_t br_get_link_af_size(const struct net_device *dev)
> {
> struct net_port_vlans *pv;
>
> - if (br_port_exists(dev))
> - pv = nbp_get_vlan_info(br_port_get_rtnl(dev));
> - else if (dev->priv_flags & IFF_EBRIDGE)
> + if (br_port_exists(dev)) {
> + rcu_read_lock();
> + pv = nbp_get_vlan_info(br_port_get_rcu(dev));
> + rcu_read_unlock();
Note that I'm not entirely sure about the locking for "pv" here. In this
patch I'm basically assuming that nbp_get_vlan_info() is safe in any
context, which actually seems rather unlikely.
This clearly gets rid of the lockdep complaint for me, but I'm not sure
it's actually safe.
johannes
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists