Re: [PATCH v6] driver core: Fix use-after-free and double free on glue directory

2019-07-25 Thread Greg KH
On Thu, Jul 25, 2019 at 11:52:24AM +0530, Prateek Sood wrote: > On 7/24/19 9:30 PM, Muchun Song wrote: > > There is a race condition between removing glue directory and adding a new > > device under the glue directory. It can be reproduced in following test: > > > > path 1: Add the child device un

Re: [PATCH v6] driver core: Fix use-after-free and double free on glue directory

2019-07-24 Thread Prateek Sood
On 7/24/19 9:30 PM, Muchun Song wrote: > There is a race condition between removing glue directory and adding a new > device under the glue directory. It can be reproduced in following test: > > path 1: Add the child device under glue dir > device_add() > get_device_parent() > mutex_lo

[PATCH v6] driver core: Fix use-after-free and double free on glue directory

2019-07-24 Thread Muchun Song
There is a race condition between removing glue directory and adding a new device under the glue directory. It can be reproduced in following test: path 1: Add the child device under glue dir device_add() get_device_parent() mutex_lock(&gdp_mutex); /*find parent fr