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

From: Benjamin Herrenschmidt
Date: Thu May 02 2019 - 02:25:58 EST


On Sun, 2019-04-28 at 22:49 +0800, Muchun Song wrote:
> Hi Greg and Rafael:
>
>
> Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> ä2019å4æ28æåæ
> äå6:10åéï
> >
> > The basic idea yes, the whole bool *locked is horrid though.
> > Wouldn't it
> > work to have a get_device_parent_locked that always returns with
> > the mutex held,
> > or just move the mutex to the caller or something simpler like this
> > ?
> >
>
> Greg and Rafael, do you have any suggestions for this? Or you also
> agree with Ben?

Ping guys ? This is worth fixing...

Ben.