mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-18 03:07:06 -04:00
Currently, ttm_bo_swapout is not exercised by the TTM KUnit tests. It used to be exercised until commit76689eb526("drm/ttm: remove ttm_bo_validate_swapout test"), but that test was removed as it was unreliable due to requiring to allocate half of the system memory. Calling ttm_bo_swapout directly with a single allocated BO, however, does not suffer from that problem, and was able to detect a UAF introduced by commitc06da4b357("drm/ttm: Tidy usage of local variables a little bit"), when built with KASAN. When applying a fix to that UAF, the test passed without any issues. Cc: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Cc: Christian König <christian.koenig@amd.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net> Link: https://lore.kernel.org/r/20260309-ttm_bo_swapout_test-v2-1-219f64046cfe@igalia.com