Re: [PATCH] mm: thp: Fix refcount leak in thpsize_create() error path

From: Andrew Morton

Date: Sun Apr 12 2026 - 13:59:53 EST


On Sun, 12 Apr 2026 09:33:29 -0400 Zi Yan <ziy@xxxxxxxxxx> wrote:

> > wording, especially:
> >
> > "resulting in a refcount leak and potentially leading to a use-after-free"
> >
> > The old code does skip the required kobject cleanup path, but is
> > a UAF actually possible there?
>
> That is my question too. The original code might not cause any real issue.
>
> Guangshuo, let us know if we get it wrong. Thanks.

Thanks, all. I queued this for testing and added a note that a
changlog update is expected.