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

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Mon Nov 16 06:32:16 MSK 2026


> From: Michał Grzelak <michal.grzelak at intel.com>
> 
> During initialization of DRM buddy memory manager at drm_buddy_init,
> mm->free_trees array is allocated for both clear and dirty RB trees.
> During cleanup happening at drm_buddy_fini it is never freed, leading to
> following memory leaks observed on xe module load & unload cycles:
> 
>     kmemleak_alloc+0x4a/0x90
>     __kmalloc_cache_noprof+0x488/0x800
>     drm_buddy_init+0xc2/0x330 [drm_buddy]
>     __xe_ttm_vram_mgr_init+0xc3/0x190 [xe]
>     xe_ttm_stolen_mgr_init+0xf5/0x9d0 [xe]
>     xe_device_probe+0x326/0x9e0 [xe]
>     xe_pci_probe+0x39a/0x610 [xe]
>     local_pci_probe+0x47/0xb0
> [ ... ]
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-154850
> 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/20261116032734.24795-1-mirian.shilakadze@virtuozzo.com?part=1




More information about the Devel mailing list