drm/amdkfd: Handle invalid event type in CRIU event restore
Subsystems (3)
PATCH 1/1 drm/amdkfd: Handle invalid event type in CRIU event restore
In kfd_criu_restore_event, there was no handling for the event priv data having an invalid event type. The priv data here is untrusted and can be invalid.
In that case, fail with EINVAL.
Signed-off-by David Francis <[email protected]>
--- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_events.c +3 -0
@@ -452,6 +452,9 @@ int kfd_criu_restore_event(struct file *devkfd, ret =create_other_event (p, ev, &ev_priv->event_id);break ; +default : + ret = -EINVAL ; +break ; }mutex_unlock (&p->event_mutex);
Signature · 1 line
2.34.1
AMD General
Reviewed-by Kent Russell <[email protected]>
Quoted 36 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of David Francis
Sent: July 21, 2026 9:38 AM
To: [email protected]
Cc: Francis, David <[email protected]>
Subject: [PATCH] drm/amdkfd: Handle invalid event type in CRIU event restoreIn
kfd_criu_restore_event, there was no handling for the event priv data having an invalid event type. The priv data here is untrusted and can be invalid.In that case, fail with EINVAL.
Signed-off-by David Francis <[email protected]>--- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/amd/amdkfd/kfd_events.c +3
-1@@ -452,6 +452,9 @@ int kfd_criu_restore_event(struct file *devkfd, ret =create_other_event (p, ev, &ev_priv->event_id);break ; +default : + ret = -EINVAL ; +break ; }mutex_unlock (&p->event_mutex); --2.34.1