]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
video: tegra: host: use dynamically allocated wait_queue
authorDeepak Nibade <dnibade@nvidia.com>
Wed, 20 Jan 2016 13:39:19 +0000 (19:09 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Fri, 19 Feb 2016 02:07:10 +0000 (18:07 -0800)
commit3b9ba7d856ab7b4d8a52f01dda4e890b1f85c546
tree0ecc759bc7ebed6a63d9b23ca0e12f50e3426715
parentf3ce711e4c5479a38d4578d2d4da89a92607bea1
video: tegra: host: use dynamically allocated wait_queue

In nvhost_syncpt_wait_timeout(), we currently allocate
wait_queue_head on stack using
DECLARE_WAIT_QUEUE_HEAD_ONSTACK()

If wait is complete, then this wait_queue_head will
removed off the stack

But in some rare case if action_wakeup_interruptible()
is called after wait is complete, we try to access
wait_queue_head which is already deleted from stack

To fix this, define wait_queue_head inside nvhost_waitlist
and allocate it dynamically along with waitlist

Bug 200126989

Change-Id: Iad7869323832e6f36c044e0d29fdea62dca762d5
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/935161
(cherry picked from commit 80b5c960e95b9f1f4c1401b03d72641ac4b6ccc6)
Reviewed-on: http://git-master/r/1013277
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
drivers/video/tegra/host/nvhost_intr.c
drivers/video/tegra/host/nvhost_intr.h
drivers/video/tegra/host/nvhost_syncpt.c