mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 03:35:32 -04:00
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 <David.Francis@amd.com>
Reviewed-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 2e8e9963cd)
Cc: stable@vger.kernel.org
This commit is contained in:
committed by
Alex Deucher
parent
0ebf413b44
commit
a9cdc85839
@@ -524,6 +524,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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user