Re: [PATCH] net: dsa: Fix off-by-one number of calls to devlink_port_unregister

2019-09-02 Thread David Miller
From: Vladimir Oltean Date: Sat, 31 Aug 2019 15:46:19 +0300 > When a function such as dsa_slave_create fails, currently the following > stack trace can be seen: ... > devlink_free is complaining right here: > > WARN_ON(!list_empty(&devlink->port_list)); > > This happens because devlink_p

Re: [PATCH] net: dsa: Fix off-by-one number of calls to devlink_port_unregister

2019-08-31 Thread Vivien Didelot
On Sat, 31 Aug 2019 15:46:19 +0300, Vladimir Oltean wrote: > When a function such as dsa_slave_create fails, currently the following > stack trace can be seen: > > [2.038342] sja1105 spi0.1: Probed switch chip: SJA1105T > [2.054556] sja1105 spi0.1: Reset switch and programmed static confi

Re: [PATCH] net: dsa: Fix off-by-one number of calls to devlink_port_unregister

2019-08-31 Thread Vivien Didelot
Hi Vladimir, On Sat, 31 Aug 2019 19:54:40 +0300, Vladimir Oltean wrote: > Fine, I had not noticed the "registered" field from devlink_port. > But I fail to see how dsa_port_teardown can be entered in the generic > case from whatever failure state dsa_port_setup left it in. What if > it's a DSA_PO

Re: [PATCH] net: dsa: Fix off-by-one number of calls to devlink_port_unregister

2019-08-31 Thread Vladimir Oltean
Hi Vivien, On Sat, 31 Aug 2019 at 19:20, Vivien Didelot wrote: > > Hi Vladimir, > > On Sat, 31 Aug 2019 15:46:19 +0300, Vladimir Oltean wrote: > > When a function such as dsa_slave_create fails, currently the following > > stack trace can be seen: > > > > [2.038342] sja1105 spi0.1: Probed sw

Re: [PATCH] net: dsa: Fix off-by-one number of calls to devlink_port_unregister

2019-08-31 Thread Vivien Didelot
Hi Vladimir, On Sat, 31 Aug 2019 15:46:19 +0300, Vladimir Oltean wrote: > When a function such as dsa_slave_create fails, currently the following > stack trace can be seen: > > [2.038342] sja1105 spi0.1: Probed switch chip: SJA1105T > [2.054556] sja1105 spi0.1: Reset switch and programme

[PATCH] net: dsa: Fix off-by-one number of calls to devlink_port_unregister

2019-08-31 Thread Vladimir Oltean
When a function such as dsa_slave_create fails, currently the following stack trace can be seen: [2.038342] sja1105 spi0.1: Probed switch chip: SJA1105T [2.054556] sja1105 spi0.1: Reset switch and programmed static config [2.063837] sja1105 spi0.1: Enabled switch tagging [2.068706]