Skip to content

Commit

Permalink
fixup! drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name
Browse files Browse the repository at this point in the history
(cherry picked from commit 1964693 https://github.com/AsahiLinux/linux)
Signed-off-by: John Cabaj <[email protected]>
  • Loading branch information
jannau authored and john-cabaj committed Jun 14, 2024
1 parent e6f9f9e commit b3198a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/scheduler/sched_fence.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ void drm_sched_fence_init(struct drm_sched_fence *fence,
unsigned seq;

fence->sched = entity->rq->sched;
strlcpy(fence->sched_name, entity->rq->sched->name,
strscpy(fence->sched_name, entity->rq->sched->name,
sizeof(fence->sched_name));
seq = atomic_inc_return(&entity->fence_seq);
dma_fence_init(&fence->scheduled, &drm_sched_fence_ops_scheduled,
Expand Down

0 comments on commit b3198a5

Please sign in to comment.