Re: [PATCH net-next] net: dsa: remove tree refcount

2017-11-09 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > On Thu, Nov 09, 2017 at 12:36:52PM -0500, Vivien Didelot wrote: >> Setting the refcount to 0 when allocating a tree to match the number of >> switch devices it holds may cause an 'increment on 0; use-after-free'. >> >> Tracking the number of

Re: [PATCH net-next] net: dsa: remove tree refcount

2017-11-09 Thread Andrew Lunn
On Thu, Nov 09, 2017 at 12:36:52PM -0500, Vivien Didelot wrote: > Setting the refcount to 0 when allocating a tree to match the number of > switch devices it holds may cause an 'increment on 0; use-after-free'. > > Tracking the number of devices in a tree with a kref is not really > appropriate