Re: [PATCH] kernfs: prevent early freeing of root node

From: Tejun Heo
Date: Wed Dec 01 2021 - 18:26:02 EST


On Wed, Dec 01, 2021 at 03:16:48PM -0800, Minchan Kim wrote:
...
> Since kernfs moves the kernfs_rwsem lock into root, it couldn't hold
> the lock when the root node is tearing down. Thus, get the refcount
> of root node.
>
> Tested-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
> Reported-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
> Signed-off-by: Minchan Kim <minchan@xxxxxxxxxx>

Acked-by: Tejun Heo <tj@xxxxxxxxxx>

Thanks.

--
tejun