]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
gpu: nvgpu: fix deadlock on timeout lock
authorDeepak Nibade <dnibade@nvidia.com>
Mon, 12 Oct 2015 08:51:34 +0000 (14:21 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Thu, 5 Nov 2015 07:23:11 +0000 (23:23 -0800)
commit42f475905ad533d0ac1ccc5dd8fc79b92c4db451
tree5e4fd3d02ea25cfade196e653f15489de3290851
parentaceac22e3e82da8de455fd84b5e41d5645088722
gpu: nvgpu: fix deadlock on timeout lock

In gk20a_channel_timeout_stop(), we take the channel's
timeout lock and then cancel the timeout worker thread

Timeout worker thread also tries to acquire same timeout
lock.

Hence, while cancelling the timeout in gk20a_channel_timeout_stop()
if the timeout_handler is already scheduled, we will have a deadlock

Fix this by moving cancel_delayed_work_sync() out of the locks

Bug 200133289
Bug 1695481

Change-Id: Iea78770180b483a63e5e176efba27831174e9dde
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/815922
(cherry picked from commit a02bd3855ccc840daff3cbb34e379c7865501283)
Reviewed-on: http://git-master/r/820160
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: http://git-master/r/825507
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
drivers/gpu/nvgpu/gk20a/channel_gk20a.c