Re: [Patch net] net: change addr_list_lock back to static key

2020-06-18 Thread Vladimir Oltean
On Fri, 19 Jun 2020 at 01:46, Andrew Lunn wrote: > > > > Hi Vladimir > > > > > > So you are suggesting this? > > > > > > > > + ret = netdev_upper_dev_link(master, slave_dev, NULL); > > > > > > Andrew > > > > Yes, basically this: > > > > diff --git a/net/dsa/slave.c b/net/dsa/slave.c > > in

Re: [Patch net] net: change addr_list_lock back to static key

2020-06-18 Thread Andrew Lunn
> > Hi Vladimir > > > > So you are suggesting this? > > > > > > + ret = netdev_upper_dev_link(master, slave_dev, NULL); > > > > Andrew > > Yes, basically this: > > diff --git a/net/dsa/slave.c b/net/dsa/slave.c > index 4c7f086a047b..6aff8cfc9cf1 100644 > --- a/net/dsa/slave.c > +++ b/net/

Re: [Patch net] net: change addr_list_lock back to static key

2020-06-18 Thread Vladimir Oltean
On Fri, 19 Jun 2020 at 01:30, Andrew Lunn wrote: > > On Thu, Jun 18, 2020 at 11:33:44PM +0300, Vladimir Oltean wrote: > > On Thu, 18 Jun 2020 at 23:06, Cong Wang wrote: > > > > > > On Thu, Jun 18, 2020 at 12:56 PM Cong Wang > > > wrote: > > > > > > > > On Thu, Jun 18, 2020 at 12:40 PM Vladimir

Re: [Patch net] net: change addr_list_lock back to static key

2020-06-18 Thread Andrew Lunn
On Thu, Jun 18, 2020 at 11:33:44PM +0300, Vladimir Oltean wrote: > On Thu, 18 Jun 2020 at 23:06, Cong Wang wrote: > > > > On Thu, Jun 18, 2020 at 12:56 PM Cong Wang wrote: > > > > > > On Thu, Jun 18, 2020 at 12:40 PM Vladimir Oltean > > > wrote: > > > > > > > > It's me with the stacked DSA devi

Re: [Patch net] net: change addr_list_lock back to static key

2020-06-18 Thread Cong Wang
On Thu, Jun 18, 2020 at 1:33 PM Vladimir Oltean wrote: > > On Thu, 18 Jun 2020 at 23:06, Cong Wang wrote: > > > > On Thu, Jun 18, 2020 at 12:56 PM Cong Wang wrote: > > > > > > On Thu, Jun 18, 2020 at 12:40 PM Vladimir Oltean > > > wrote: > > > > > > > > It's me with the stacked DSA devices aga

Re: [Patch net] net: change addr_list_lock back to static key

2020-06-18 Thread Vladimir Oltean
On Thu, 18 Jun 2020 at 23:06, Cong Wang wrote: > > On Thu, Jun 18, 2020 at 12:56 PM Cong Wang wrote: > > > > On Thu, Jun 18, 2020 at 12:40 PM Vladimir Oltean wrote: > > > > > > It's me with the stacked DSA devices again: > > > > It looks like DSA never uses netdev API to link master > > device w

Re: [Patch net] net: change addr_list_lock back to static key

2020-06-18 Thread Cong Wang
On Thu, Jun 18, 2020 at 12:56 PM Cong Wang wrote: > > On Thu, Jun 18, 2020 at 12:40 PM Vladimir Oltean wrote: > > > > It's me with the stacked DSA devices again: > > It looks like DSA never uses netdev API to link master > device with slave devices? If so, their dev->lower_level > are always 1, t

Re: [Patch net] net: change addr_list_lock back to static key

2020-06-18 Thread Cong Wang
On Thu, Jun 18, 2020 at 12:40 PM Vladimir Oltean wrote: > > It's me with the stacked DSA devices again: It looks like DSA never uses netdev API to link master device with slave devices? If so, their dev->lower_level are always 1, therefore triggers this warning. I think it should call one of the

Re: [Patch net] net: change addr_list_lock back to static key

2020-06-18 Thread Vladimir Oltean
Hi Cong, Taehee, On Tue, 9 Jun 2020 at 00:54, Cong Wang wrote: > > The dynamic key update for addr_list_lock still causes troubles, > for example the following race condition still exists: > > CPU 0: CPU 1: > (RCU read lock) (RTNL lock) > dev_mc_seq_show()

Re: [Patch net] net: change addr_list_lock back to static key

2020-06-17 Thread Cong Wang
On Tue, Jun 16, 2020 at 8:03 AM Taehee Yoo wrote: > > I agree with that. > And, do you have any plan to replace netif_addr_lock_bh() with > netif_addr_lock_nested()? > (Of course, it needs BH handling code) > I'm not sure but I think it would be needed. Yeah, I agree it's needed. I have a patch n

Re: [Patch net] net: change addr_list_lock back to static key

2020-06-16 Thread Taehee Yoo
On Tue, 16 Jun 2020 at 06:33, Cong Wang wrote: > Hi Cong, > On Sat, Jun 13, 2020 at 9:03 AM Taehee Yoo wrote: > > > > On Thu, 11 Jun 2020 at 08:21, Cong Wang wrote: > > > > > > > Hi Cong :) > > > > > On Wed, Jun 10, 2020 at 7:48 AM Taehee Yoo wrote: > > > > > > > > On Tue, 9 Jun 2020 at 06:53

Re: [Patch net] net: change addr_list_lock back to static key

2020-06-15 Thread Cong Wang
On Sat, Jun 13, 2020 at 9:03 AM Taehee Yoo wrote: > > On Thu, 11 Jun 2020 at 08:21, Cong Wang wrote: > > > > Hi Cong :) > > > On Wed, Jun 10, 2020 at 7:48 AM Taehee Yoo wrote: > > > > > > On Tue, 9 Jun 2020 at 06:53, Cong Wang wrote: > > > > > > > > + lockdep_set_class_and_subclass(&dev->

Re: [Patch net] net: change addr_list_lock back to static key

2020-06-13 Thread Taehee Yoo
On Thu, 11 Jun 2020 at 08:21, Cong Wang wrote: > Hi Cong :) > On Wed, Jun 10, 2020 at 7:48 AM Taehee Yoo wrote: > > > > On Tue, 9 Jun 2020 at 06:53, Cong Wang wrote: > > > > > > > Hi Cong, > > Thank you for this work! > > > > > The dynamic key update for addr_list_lock still causes troubles, >

Re: [Patch net] net: change addr_list_lock back to static key

2020-06-10 Thread Cong Wang
On Wed, Jun 10, 2020 at 7:48 AM Taehee Yoo wrote: > > On Tue, 9 Jun 2020 at 06:53, Cong Wang wrote: > > > > Hi Cong, > Thank you for this work! > > > The dynamic key update for addr_list_lock still causes troubles, > > for example the following race condition still exists: > > > > CPU 0:

Re: [Patch net] net: change addr_list_lock back to static key

2020-06-10 Thread Taehee Yoo
On Tue, 9 Jun 2020 at 06:53, Cong Wang wrote: > Hi Cong, Thank you for this work! > The dynamic key update for addr_list_lock still causes troubles, > for example the following race condition still exists: > > CPU 0: CPU 1: > (RCU read lock) (RTNL lock) >

Re: [Patch net] net: change addr_list_lock back to static key

2020-06-09 Thread David Miller
From: Cong Wang Date: Mon, 8 Jun 2020 14:53:01 -0700 > The dynamic key update for addr_list_lock still causes troubles, > for example the following race condition still exists: > > CPU 0:CPU 1: > (RCU read lock) (RTNL lock) > dev_mc_seq_show

[Patch net] net: change addr_list_lock back to static key

2020-06-08 Thread Cong Wang
The dynamic key update for addr_list_lock still causes troubles, for example the following race condition still exists: CPU 0: CPU 1: (RCU read lock) (RTNL lock) dev_mc_seq_show() netdev_update_lockdep_key() -