mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
drm/amdkfd: Fix error handling in kfd_criu_restore_events
commit66f7903779upstream. mutex_unlock before the exit label because all the error code paths that jump there didn't take that lock. This fixes unbalanced locking errors in case of restore errors. Fixes:40e8a766a7("drm/amdkfd: CRIU checkpoint and restore events") Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
182476d29d
commit
0a35e62c40
@@ -506,6 +506,7 @@ int kfd_criu_restore_event(struct file *devkfd,
|
||||
ret = create_other_event(p, ev, &ev_priv->event_id);
|
||||
break;
|
||||
}
|
||||
mutex_unlock(&p->event_mutex);
|
||||
|
||||
exit:
|
||||
if (ret)
|
||||
@@ -513,8 +514,6 @@ exit:
|
||||
|
||||
kfree(ev_priv);
|
||||
|
||||
mutex_unlock(&p->event_mutex);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user