Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/vmwgfx: Don't overwrite KMS surface dirty tracker

We were overwriting the surface's dirty tracker here causing a memory leak.

Reported-by: Mika Penttilä <mpenttil@redhat.com>
Closes: https://lore.kernel.org/dri-devel/8c53f3c6-c6de-46fe-a8ca-d98dd52b3abe@redhat.com/
Fixes: 965544150d1c ("drm/vmwgfx: Refactor cursor handling")
Signed-off-by: Ian Forbes <ian.forbes@broadcom.com>
Reviewed-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com>
Signed-off-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patch.msgid.link/20260302200330.66763-1-ian.forbes@broadcom.com

authored by

Ian Forbes and committed by
Zack Rusin
c6cb77c4 c7feff27

+2 -1
+2 -1
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
··· 771 771 ret = vmw_bo_dirty_add(bo); 772 772 if (!ret && surface && surface->res.func->dirty_alloc) { 773 773 surface->res.coherent = true; 774 - ret = surface->res.func->dirty_alloc(&surface->res); 774 + if (surface->res.dirty == NULL) 775 + ret = surface->res.func->dirty_alloc(&surface->res); 775 776 } 776 777 ttm_bo_unreserve(&bo->tbo); 777 778 }