Re: [PATCH v2 0/4] Fix HugeTLB subpool used_hpages tracking
From: Andrew Morton
Date: Wed Sep 09 2026 - 18:53:18 EST
On Wed, 09 Sep 2026 14:49:25 -0700 Ackerley Tng via B4 Relay <devnull+ackerleytng.google.com@xxxxxxxxxx> wrote:
> HugeTLB subpools currently only track used_hpages when the user configures
> a size limit.
>
> This is buggy since when there are existing allocations from the subpool
> that would have satisfied the minimum reservations,
> hugepage_subpool_put_pages() will still restore a reservation to the
> subpool. See below for an example of a false reservation.
That sounds annoying, although isn't clear how this affects end-users.
> In addition, the subpool is considered free prematurely, is freed, and this
> ends up causing a use-after-free.
That sounds alarming.
Do you think it's best for us to submit [1-3] for -stable backporting?
Is it feasible to come up with a set of small little fixes to get
-stable out of trouble and then to prepare broader updates for our
ongoing mainline development?
If it's "shut up Andrew you're always saying that" then OK, I can take
that :)