[Devel] [PATCH hci-8.2 1/4] ms/drm/buddy: Prevent BUG_ON by validating rounded allocation
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Wed Nov 18 14:43:34 MSK 2026
> From: Sanjay Yadav <sanjay.kumar.yadav at intel.com>
>
> When DRM_BUDDY_CONTIGUOUS_ALLOCATION is set, the requested size is
> rounded up to the next power-of-two via roundup_pow_of_two().
> Similarly, for non-contiguous allocations with large min_block_size,
> the size is aligned up via round_up(). Both operations can produce a
> rounded size that exceeds mm->size, which later triggers
> BUG_ON(order > mm->max_order).
>
> Example scenarios:
> - 9G CONTIGUOUS allocation on 10G VRAM memory:
> roundup_pow_of_two(9G) = 16G > 10G
> - 9G allocation with 8G min_block_size on 10G VRAM memory:
> round_up(9G, 8G) = 16G > 10G
>
> [ ... ]
>
> https://virtuozzo.atlassian.net/browse/VSTOR-155318
> Feature: fix ms/drm
>
> Signed-off-by: Mirian Shilakadze <mirian.shilakadze at virtuozzo.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261118113935.381228-1-mirian.shilakadze@virtuozzo.com?part=1
More information about the Devel
mailing list