aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/fair.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index d89f4a8ddf4..43857fec77b 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -7027,13 +7027,13 @@ static void hmp_migrate_runnable_task(struct rq *rq)
* with the source rq.
*/
if (src_rq->active_balance)
- return;
+ goto out;
if (src_rq->nr_running <= 1)
- return;
+ goto out;
if (task_rq(p) != src_rq)
- return;
+ goto out;
/*
* Not sure if this applies here but one can never
* be too cautious
@@ -7068,6 +7068,8 @@ static void hmp_migrate_runnable_task(struct rq *rq)
rcu_read_unlock();
double_unlock_balance(src_rq, dst_rq);
+out:
+ put_task_struct(p);
}
static DEFINE_SPINLOCK(hmp_force_migration);