* [PATCH] drivers/firmware: psci_checker: Add missing destroy_timer_on_stack()
@ 2017-10-24 15:02 ` Lorenzo Pieralisi
0 siblings, 0 replies; 8+ messages in thread
From: Lorenzo Pieralisi @ 2017-10-24 15:02 UTC (permalink / raw)
To: linux-arm-kernel
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>
---
drivers/firmware/psci_checker.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/firmware/psci_checker.c b/drivers/firmware/psci_checker.c
index 6523ce9..56cf825 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);
--
2.4.12
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH] drivers/firmware: psci_checker: Add missing destroy_timer_on_stack() @ 2017-10-24 15:02 ` Lorenzo Pieralisi 0 siblings, 0 replies; 8+ messages in thread From: Lorenzo Pieralisi @ 2017-10-24 15:02 UTC (permalink / raw) To: arm, linux-arm-kernel Cc: linux-kernel, Lorenzo Pieralisi, Kees Cook, Mark Rutland 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> --- drivers/firmware/psci_checker.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/firmware/psci_checker.c b/drivers/firmware/psci_checker.c index 6523ce9..56cf825 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); -- 2.4.12 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] drivers/firmware: psci_checker: Add missing destroy_timer_on_stack() 2017-10-24 15:02 ` Lorenzo Pieralisi @ 2017-10-30 9:17 ` Arnd Bergmann -1 siblings, 0 replies; 8+ messages in thread From: Arnd Bergmann @ 2017-10-30 9:17 UTC (permalink / raw) To: linux-arm-kernel On Tue, Oct 24, 2017 at 5:02 PM, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> wrote: > 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> Hi Lorenzo, You addressed the patch 'To: arm at kernel.org', but I'm not entirely sure what to do with it, it would be nice to be a little more explicit whether you want us to apply the patch directly or just review it, and which trees you want it to get merged into. As you are fixing a regression against v4.10, I would assume you want it merged into v4.14 with a 'cc: stable' tag to have it backported into v4.13, correct? Arnd ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drivers/firmware: psci_checker: Add missing destroy_timer_on_stack() @ 2017-10-30 9:17 ` Arnd Bergmann 0 siblings, 0 replies; 8+ messages in thread From: Arnd Bergmann @ 2017-10-30 9:17 UTC (permalink / raw) To: Lorenzo Pieralisi Cc: arm-soc, Linux ARM, Linux Kernel Mailing List, Kees Cook, Mark Rutland On Tue, Oct 24, 2017 at 5:02 PM, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> wrote: > 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> Hi Lorenzo, You addressed the patch 'To: arm@kernel.org', but I'm not entirely sure what to do with it, it would be nice to be a little more explicit whether you want us to apply the patch directly or just review it, and which trees you want it to get merged into. As you are fixing a regression against v4.10, I would assume you want it merged into v4.14 with a 'cc: stable' tag to have it backported into v4.13, correct? Arnd ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] drivers/firmware: psci_checker: Add missing destroy_timer_on_stack() 2017-10-30 9:17 ` Arnd Bergmann @ 2017-10-30 9:48 ` Lorenzo Pieralisi -1 siblings, 0 replies; 8+ messages in thread From: Lorenzo Pieralisi @ 2017-10-30 9:48 UTC (permalink / raw) To: linux-arm-kernel On Mon, Oct 30, 2017 at 10:17:54AM +0100, Arnd Bergmann wrote: > On Tue, Oct 24, 2017 at 5:02 PM, Lorenzo Pieralisi > <lorenzo.pieralisi@arm.com> wrote: > > 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> > > Hi Lorenzo, > > You addressed the patch 'To: arm at kernel.org', but I'm not entirely > sure what to do with it, it would be nice to be a little more explicit whether > you want us to apply the patch directly or just review it, and which trees > you want it to get merged into. Yes, I was about to reply to you - I should have added some comments to the patch itself, apologies. > As you are fixing a regression against v4.10, I would assume you want > it merged into v4.14 with a 'cc: stable' tag to have it backported into v4.13, > correct? Yes it is correct - since the PSCI checker went through ARM SoC I expect fixes to go through ARM SoC too please (but I should have mentioned the summary you correctly wrote up above myself). Thanks, Lorenzo ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drivers/firmware: psci_checker: Add missing destroy_timer_on_stack() @ 2017-10-30 9:48 ` Lorenzo Pieralisi 0 siblings, 0 replies; 8+ messages in thread From: Lorenzo Pieralisi @ 2017-10-30 9:48 UTC (permalink / raw) To: Arnd Bergmann Cc: arm-soc, Linux ARM, Linux Kernel Mailing List, Kees Cook, Mark Rutland On Mon, Oct 30, 2017 at 10:17:54AM +0100, Arnd Bergmann wrote: > On Tue, Oct 24, 2017 at 5:02 PM, Lorenzo Pieralisi > <lorenzo.pieralisi@arm.com> wrote: > > 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> > > Hi Lorenzo, > > You addressed the patch 'To: arm@kernel.org', but I'm not entirely > sure what to do with it, it would be nice to be a little more explicit whether > you want us to apply the patch directly or just review it, and which trees > you want it to get merged into. Yes, I was about to reply to you - I should have added some comments to the patch itself, apologies. > As you are fixing a regression against v4.10, I would assume you want > it merged into v4.14 with a 'cc: stable' tag to have it backported into v4.13, > correct? Yes it is correct - since the PSCI checker went through ARM SoC I expect fixes to go through ARM SoC too please (but I should have mentioned the summary you correctly wrote up above myself). Thanks, Lorenzo ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] drivers/firmware: psci_checker: Add missing destroy_timer_on_stack() 2017-10-30 9:48 ` Lorenzo Pieralisi @ 2017-11-02 15:35 ` Arnd Bergmann -1 siblings, 0 replies; 8+ messages in thread From: Arnd Bergmann @ 2017-11-02 15:35 UTC (permalink / raw) To: linux-arm-kernel On Mon, Oct 30, 2017 at 10:48 AM, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> wrote: > On Mon, Oct 30, 2017 at 10:17:54AM +0100, Arnd Bergmann wrote: >> On Tue, Oct 24, 2017 at 5:02 PM, Lorenzo Pieralisi >> <lorenzo.pieralisi@arm.com> wrote: >> > 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> >> >> Hi Lorenzo, >> >> You addressed the patch 'To: arm at kernel.org', but I'm not entirely >> sure what to do with it, it would be nice to be a little more explicit whether >> you want us to apply the patch directly or just review it, and which trees >> you want it to get merged into. > > Yes, I was about to reply to you - I should have added some comments > to the patch itself, apologies. Applied to next/drivers now, thanks! Arnd ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drivers/firmware: psci_checker: Add missing destroy_timer_on_stack() @ 2017-11-02 15:35 ` Arnd Bergmann 0 siblings, 0 replies; 8+ messages in thread From: Arnd Bergmann @ 2017-11-02 15:35 UTC (permalink / raw) To: Lorenzo Pieralisi Cc: arm-soc, Linux ARM, Linux Kernel Mailing List, Kees Cook, Mark Rutland On Mon, Oct 30, 2017 at 10:48 AM, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> wrote: > On Mon, Oct 30, 2017 at 10:17:54AM +0100, Arnd Bergmann wrote: >> On Tue, Oct 24, 2017 at 5:02 PM, Lorenzo Pieralisi >> <lorenzo.pieralisi@arm.com> wrote: >> > 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> >> >> Hi Lorenzo, >> >> You addressed the patch 'To: arm@kernel.org', but I'm not entirely >> sure what to do with it, it would be nice to be a little more explicit whether >> you want us to apply the patch directly or just review it, and which trees >> you want it to get merged into. > > Yes, I was about to reply to you - I should have added some comments > to the patch itself, apologies. Applied to next/drivers now, thanks! Arnd ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-11-02 15:35 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-10-24 15:02 [PATCH] drivers/firmware: psci_checker: Add missing destroy_timer_on_stack() Lorenzo Pieralisi 2017-10-24 15:02 ` Lorenzo Pieralisi 2017-10-30 9:17 ` Arnd Bergmann 2017-10-30 9:17 ` Arnd Bergmann 2017-10-30 9:48 ` Lorenzo Pieralisi 2017-10-30 9:48 ` Lorenzo Pieralisi 2017-11-02 15:35 ` Arnd Bergmann 2017-11-02 15:35 ` Arnd Bergmann
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.