Skip to content

Commit 7bbe14a

Browse files
mbrost05jfvogel
authored andcommitted
drm/xe: Use local fence in error path of xe_migrate_clear
commit 20659d3150f1a2a258a173fe011013178ff2a197 upstream. The intent of the error path in xe_migrate_clear is to wait on locally generated fence and then return. The code is waiting on m->fence which could be the local fence but this is only stable under the job mutex leading to a possible UAF. Fix code to wait on local fence. Fixes: dd08ebf ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: [email protected] Signed-off-by: Matthew Brost <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Link: https://lore.kernel.org/r/[email protected] (cherry picked from commit 762b7e95362170b3e13a8704f38d5e47eca4ba74) Signed-off-by: Lucas De Marchi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> (cherry picked from commit 2ac5f466f62892a7d1ac2d1a3eb6cd14efbe2f2d) Signed-off-by: Jack Vogel <[email protected]>
1 parent 5062fad commit 7bbe14a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/xe/xe_migrate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ struct dma_fence *xe_migrate_clear(struct xe_migrate *m,
11771177
err_sync:
11781178
/* Sync partial copies if any. FIXME: job_mutex? */
11791179
if (fence) {
1180-
dma_fence_wait(m->fence, false);
1180+
dma_fence_wait(fence, false);
11811181
dma_fence_put(fence);
11821182
}
11831183

0 commit comments

Comments
 (0)