drm/amdkfd: Fix event destruction with pending waiters
authorFelix Kuehling <Felix.Kuehling@amd.com>
Fri, 27 Oct 2017 23:35:23 +0000 (19:35 -0400)
committerOded Gabbay <oded.gabbay@gmail.com>
Fri, 27 Oct 2017 23:35:23 +0000 (19:35 -0400)
commitfe528c13acc764965929b7fcb5fadf2c15b57373
tree60affa2a40e5b33961f787dbff83491320a0e414
parentfdf0c8332a0309ac619e22e82b6014c77b2a3518
drm/amdkfd: Fix event destruction with pending waiters

When an event with pending waiters is destroyed, those waiters may
end up sleeping forever unless they are notified and woken up.
Implement the notification by clearing the waiter->event pointer,
which becomes invalid anyway, when the event is freed, and waking
up the waiting tasks.

Waiters on an event that's destroyed return failure.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/gpu/drm/amd/amdkfd/kfd_events.c