[Devel] [PATCH hci-8.2 0/4] drm/buddy: backport buddy allocator fixes
Konstantin Khorenko
khorenko at virtuozzo.com
Wed Nov 18 18:37:31 MSK 2026
On Wed, 18 Nov 2026 15:38:09 +0400, Mirian Shilakadze wrote:
> drm/buddy: backport buddy allocator fixes
>
> Item 1 from the review of VSTOR-154850 v1. Upstream fixes for the buddy
> allocator code that came with the RHEL import:
>
> 1. 5488a29596cd: a rounded up allocation larger than the memory size
> hits BUG_ON(order > mm->max_order).
> 2. 0251963afd22: a failed split_block() leaves a freed block in the free
> tree (use-after-free).
> 3. 56bc6384314f: the contiguous fallback can return a start that ignores
> min_block_size.
> 4. fb26cf4f1df4: when the contiguous fallback fails or retries, it
> frees the whole list the caller passed in, including blocks the
> caller allocated before. Not in the ticket and not in mainline yet
> (linux-next, Cc stable). Taken because it fixes the same fallback as
> 3 and the drm_buddy suite catches it: without 4, alloc_contiguous
> fails on the check that 4 adds.
>
> [...]
Applied to branch-rh10-6.12.0-211.75.1.26.x.vz10-ovz, will be released in rh10-6.12.0-211.75.1.26.3.vz10, thanks!
[1/4] ms/drm/buddy: Prevent BUG_ON by validating rounded allocation
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/4b873b5a7f3e
[2/4] ms/gpu/buddy: Fix use-after-free in split_block() call sites
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/704a31674110
[3/4] ms/gpu/buddy: bail out of try_harder when alignment cannot be honoured
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/f7ca97237c53
[4/4] ms/gpu/buddy: do not pass caller list to __alloc_contig_try_harder()
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/9ea6fbb9f78f
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
More information about the Devel
mailing list