diff options
author | Jean-Philippe Brucker | 2019-06-10 19:38:29 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2019-08-06 19:06:48 +0200 |
commit | cdee3f53510a65c07b98e18a534c69b62027eb96 (patch) | |
tree | 8c73ec909875a7e3e9b711563ef5ef92cd177d81 /scripts | |
parent | kernel/module.c: Only return -EEXIST for modules that have finished loading (diff) | |
download | kernel-qcow2-linux-cdee3f53510a65c07b98e18a534c69b62027eb96.tar.gz kernel-qcow2-linux-cdee3f53510a65c07b98e18a534c69b62027eb96.tar.xz kernel-qcow2-linux-cdee3f53510a65c07b98e18a534c69b62027eb96.zip |
firmware/psci: psci_checker: Park kthreads before stopping them
[ Upstream commit 92e074acf6f7694e96204265eb18ac113f546e80 ]
Since commit 85f1abe0019f ("kthread, sched/wait: Fix kthread_parkme()
completion issue"), kthreads that are bound to a CPU must be parked
before being stopped. At the moment the PSCI checker calls
kthread_stop() directly on the suspend kthread, which triggers the
following warning:
[ 6.068288] WARNING: CPU: 1 PID: 1 at kernel/kthread.c:398 __kthread_bind_mask+0x20/0x78
...
[ 6.190151] Call trace:
[ 6.192566] __kthread_bind_mask+0x20/0x78
[ 6.196615] kthread_unpark+0x74/0x80
[ 6.200235] kthread_stop+0x44/0x1d8
[ 6.203769] psci_checker+0x3bc/0x484
[ 6.207389] do_one_initcall+0x48/0x260
[ 6.211180] kernel_init_freeable+0x2c8/0x368
[ 6.215488] kernel_init+0x10/0x100
[ 6.218935] ret_from_fork+0x10/0x1c
[ 6.222467] ---[ end trace e05e22863d043cd3 ]---
kthread_unpark() tries to bind the thread to its CPU and aborts with a
WARN() if the thread wasn't in TASK_PARKED state. Park the kthreads
before stopping them.
Fixes: 85f1abe0019f ("kthread, sched/wait: Fix kthread_parkme() completion issue")
Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions