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

From: Benjamin Herrenschmidt
Date: Wed Jul 03 2019 - 18:58:05 EST


On Wed, 2019-07-03 at 21:37 +0200, Greg KH wrote:
> Ok, I guess I have to take this patch, as the other one is so bad :)
>
> But, I need a very large comment here saying why we are poking around in
> a kref and why we need to do this, at the expense of anything else.
>
> So can you respin this patch with a comment here to help explain it so
> we have a chance to understand it when we run across this line in 10
> years?

Also are we confident that an open dir on the glue dir from userspace
won't keep the kref up ?

Cheers,
Ben.