[Devel] [PATCH hci-8.1] ms/drm/buddy: release free_trees array on buddy mm teardown

Konstantin Khorenko khorenko at virtuozzo.com
Mon Nov 16 18:59:46 MSK 2026


Applying as is.

On Mon, 16 Nov 2026 07:27:21 +0400, Mirian Shilakadze <mirian.shilakadze at virtuozzo.com> wrote:
> Deallocate array for free trees when cleaning up buddy memory manager
> in the same way as if going through out_free_tree label.

Same hunk as mainline 7d0507772406e. RHEL 264.7.1 already carries it,
so this commit drops out at the rebase onto 264.x.

Separate patches, not needed for this one. I created a task for it:

1. drm_buddy.c here lacks three later mainline fixes: 5488a29596cdb
   ("drm/buddy: Prevent BUG_ON by validating rounded allocation"),
   56bc6384314fb ("gpu/buddy: bail out of try_harder when alignment
   cannot be honoured") and 0251963afd22d ("gpu/buddy: Fix
   use-after-free in split_block() call sites"). The first is a
   BUG_ON on a contiguous allocation rounded past mm->size, the last a
   use-after-free on the split_block() error paths, which 264.x still
   has too.
   https://virtuozzo.atlassian.net/browse/VSTOR-155318

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team



More information about the Devel mailing list