diff options
author | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2017-10-24 16:02:33 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2017-11-02 16:35:34 +0100 |
commit | 51d3290c3ad6ba691bd66df8ead6e7c19dc995f1 (patch) | |
tree | 44b2225e117f8f3f3afb0997ab56382d45daa70f | |
parent | 9855b3db5121a3900f43e9392285b44b71247adc (diff) | |
download | linux-stable-51d3290c3ad6ba691bd66df8ead6e7c19dc995f1.tar.gz linux-stable-51d3290c3ad6ba691bd66df8ead6e7c19dc995f1.tar.bz2 linux-stable-51d3290c3ad6ba691bd66df8ead6e7c19dc995f1.zip |
drivers/firmware: psci_checker: Add missing destroy_timer_on_stack()
The PSCI checker suspend_test_thread() function (ie executed for the
suspend test) requires an on-stack timer to carry out the test it
executes; it sets it up through the setup_timer_on_stack() API.
setup_timer_on_stack() requires its counterpart destroy_timer_on_stack()
to be called when the timer is disposed of but the PSCI checker code is
currently missing that call, leaving the timer object in an incosistent
state when the PSCI checker stops the thread executing the suspend
test.
Add the missing destroy_timer_on_stack() call to fix the omission.
Fixes: ea8b1c4a6019 ("drivers: psci: PSCI checker module")
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reported-by: Kees Cook <keescook@chromium.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | drivers/firmware/psci_checker.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/firmware/psci_checker.c b/drivers/firmware/psci_checker.c index 6523ce962865..56cf825ed779 100644 --- a/drivers/firmware/psci_checker.c +++ b/drivers/firmware/psci_checker.c @@ -340,6 +340,7 @@ static int suspend_test_thread(void *arg) * later. */ del_timer(&wakeup_timer); + destroy_timer_on_stack(&wakeup_timer); if (atomic_dec_return_relaxed(&nb_active_threads) == 0) complete(&suspend_threads_done); |