summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorTejas Upadhyay <tejas.upadhyay@intel.com>2026-10-06 18:11:28 +0530
committerDave Airlie <airlied@redhat.com>2026-11-09 19:17:53 +1000
commitd4293625c7847de897b83262fb054fca1437bc05 (patch)
treed2011e362ecbfc80d9382922698ad641545872da /tools/perf/scripts/python/bin
parent6628e7d4c6b25c8d18f1345e3a20d21829aae7e4 (diff)
drm/xe: Re-validate external pin under resv lock before VRAM purge
xe_ttm_vram_reserve_page_at_addr() checks xe_bo_is_user() && xe_bo_is_pinned() while holding only mgr->lock, not the BO's reservation lock, since it must run before the owning BO is even known to be purgeable. A user BO can become pinned after that check passes but before xe_ttm_vram_purge_page() runs. xe_ttm_vram_purge_page() takes the reservation lock but only rechecks xe_bo_is_pinned(), not xe_bo_is_user(). If the race is hit, it calls xe_bo_unpin() (the kernel-BO unpin path, not xe_bo_unpin_external())on an externally pinned BO and then purges its backing store while userspace/hardware still expects it to be resident. Recheck xe_bo_is_user() && xe_bo_is_pinned() under the reservation lock and reject the purge, requesting SBR with -EIO the same way the caller's own critical-BO check already does. Fixes: 7737f819e9f1 ("drm/xe/vram: Add VRAM page offline fault handler") Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Link: https://patch.msgid.link/20261006124125.1560295-8-tejas.upadhyay@intel.com Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com> (cherry picked from commit 5da52b08381a35c03ad443265dcec091ab26eeb7) Signed-off-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions