]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amdkfd: Handle restart of kfd_ioctl_wait_events
authorFelix Kuehling <Felix.Kuehling@amd.com>
Thu, 4 Aug 2022 22:19:38 +0000 (18:19 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:31:32 +0000 (10:31 +0200)
commit21e3891abc83f2d5482c67cca2fb7f228635daaf
tree652f2cf394ecbb657d6c75ec7047f60c035c4315
parent952d4c72d9032eec5c38249ca353d31c43be06e0
drm/amdkfd: Handle restart of kfd_ioctl_wait_events

[ Upstream commit bea9a56afbc4b5a41ea579b8b0dc5e189b439504 ]

When kfd_ioctl_wait_events needs to restart due to a signal, we need to
update the timeout to account for the time already elapsed. We also need
to undo auto_reset of events that have signaled already, so that the
restarted ioctl will be able to count those signals again.

This fixes infinite hangs when kfd_ioctl_wait_events is interrupted by a
signal.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-and-tested-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
drivers/gpu/drm/amd/amdkfd/kfd_events.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h