[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1425528075.5130.238.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Wed, 04 Mar 2015 20:01:15 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Mahesh Bandewar <maheshb@...gle.com>
Cc: Jay Vosburgh <j.vosburgh@...il.com>,
Andy Gospodarek <andy@...yhouse.net>,
Veaceslav Falico <vfalico@...il.com>,
Nikolay Aleksandrov <nikolay@...hat.com>,
David Miller <davem@...emloft.net>,
Maciej Zenczykowski <maze@...gle.com>,
netdev <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net-next v1] bonding: implement bond_poll_controller()
On Wed, 2015-03-04 at 18:26 -0800, Mahesh Bandewar wrote:
...
> + rcu_read_lock();
> + bond_for_each_slave_rcu(bond, slave, iter) {
> + ops = slave->dev->netdev_ops;
> + if (!bond_slave_is_up(slave) || !ops->ndo_poll_controller)
> + continue;
> +
> + if (BOND_MODE(bond) == BOND_MODE_8023AD) {
> + struct aggregator *agg =
> + SLAVE_AD_INFO(slave)->port.aggregator;
> +
> + if (agg &&
> + agg->aggregator_identifier != ad_info.aggregator_id)
> + continue;
> + }
> +
> + ni = rcu_dereference_bh(slave->dev->npinfo);
rcu_read_lock();
X = rcu_dereference_bh(Y);
rcu_read_unlock();
Is a mismatch of RCU API.
It should be either :
rcu_read_lock();
X = rcu_dereference(Y);
rcu_read_unlock();
or
rcu_read_lock_bh();
X = rcu_dereference_bh(Y);
rcu_read_unlock_bh();
> + if (down_trylock(&ni->dev_lock))
> + continue;
> + ops->ndo_poll_controller(slave->dev);
> + up(&ni->dev_lock);
> + }
> + rcu_read_unlock();
> }
>
> static void bond_netpoll_cleanup(struct net_device *bond_dev)
--
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