aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdkfd/kfd_events.c
diff options
context:
space:
mode:
authorFelix Kuehling <Felix.Kuehling@amd.com>2022-11-03 17:01:46 -0400
committerAlex Deucher <alexander.deucher@amd.com>2022-11-09 17:57:16 -0500
commit66f7903779fbbc620bf1040017e4833ef6a0b541 (patch)
tree0d027388eee6fea4ae53c9b13dc1229989f8bd13 /drivers/gpu/drm/amd/amdkfd/kfd_events.c
parentdrm/amd/pm: update SMU IP v13.0.4 msg interface header (diff)
downloadlinux-dev-66f7903779fbbc620bf1040017e4833ef6a0b541.tar.xz
linux-dev-66f7903779fbbc620bf1040017e4833ef6a0b541.zip
drm/amdkfd: Fix error handling in kfd_criu_restore_events
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: 40e8a766a761 ("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
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_events.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_events.c b/drivers/gpu/drm/amd/amdkfd/kfd_events.c
index 83e3ce9f6049..729d26d648af 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_events.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_events.c
@@ -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;
}