mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 03:27:03 +02:00
sched/walt: core_ctl init out of order
core_ctl is launching a kthread which uses a spinlock, prior to initializing the spinlock. This creates a race, and a lockup. Change-Id: I170a77addc6e4c2cc90b6683b50723008760f2f4 Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
This commit is contained in:
parent
91bd0dce3b
commit
fe4c36c11b
|
|
@ -1327,14 +1327,14 @@ int core_ctl_init(void)
|
|||
struct walt_sched_cluster *cluster;
|
||||
int ret;
|
||||
|
||||
/* initialize our single kthread */
|
||||
spin_lock_init(&core_ctl_pending_lock);
|
||||
|
||||
/* initialize our single kthread, after spin lock init */
|
||||
core_ctl_thread = kthread_run(try_core_ctl, NULL, "core_ctl");
|
||||
|
||||
if (IS_ERR(core_ctl_thread))
|
||||
return PTR_ERR(core_ctl_thread);
|
||||
|
||||
spin_lock_init(&core_ctl_pending_lock);
|
||||
|
||||
sched_setscheduler_nocheck(core_ctl_thread, SCHED_FIFO, ¶m);
|
||||
|
||||
for_each_sched_cluster(cluster) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user