Skip to content

Commit 09c0509

Browse files
author
CKI KWF Bot
committed
Merge: sched: several fixes from sched/urgent for 9.8
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7612 JIRA: https://issues.redhat.com/browse/RHEL-128251 Several fixes have landed upstream circa v6.18 for things we have in EL9. Pull them in to 9.8 to prevent later issues. Signed-off-by: Phil Auld <pauld@redhat.com> Approved-by: Herton R. Krzesinski <herton@redhat.com> Approved-by: Waiman Long <longman@redhat.com> Approved-by: Juri Lelli <juri.lelli@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 0a94a4a + 24822b1 commit 09c0509

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

kernel/sched/fair.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8489,21 +8489,21 @@ done: __maybe_unused;
84898489
return p;
84908490

84918491
idle:
8492-
if (!rf)
8493-
return NULL;
8494-
8495-
new_tasks = sched_balance_newidle(rq, rf);
8492+
if (rf) {
8493+
new_tasks = sched_balance_newidle(rq, rf);
84968494

8497-
/*
8498-
* Because sched_balance_newidle() releases (and re-acquires) rq->lock, it is
8499-
* possible for any higher priority task to appear. In that case we
8500-
* must re-start the pick_next_entity() loop.
8501-
*/
8502-
if (new_tasks < 0)
8503-
return RETRY_TASK;
8495+
/*
8496+
* Because sched_balance_newidle() releases (and re-acquires)
8497+
* rq->lock, it is possible for any higher priority task to
8498+
* appear. In that case we must re-start the pick_next_entity()
8499+
* loop.
8500+
*/
8501+
if (new_tasks < 0)
8502+
return RETRY_TASK;
85048503

8505-
if (new_tasks > 0)
8506-
goto again;
8504+
if (new_tasks > 0)
8505+
goto again;
8506+
}
85078507

85088508
/*
85098509
* rq is about to be idle, check if we need to update the

kernel/sched/topology.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2252,6 +2252,8 @@ int sched_numa_find_nth_cpu(const struct cpumask *cpus, int cpu, int node)
22522252
goto unlock;
22532253

22542254
hop_masks = bsearch(&k, k.masks, sched_domains_numa_levels, sizeof(k.masks[0]), hop_cmp);
2255+
if (!hop_masks)
2256+
goto unlock;
22552257
hop = hop_masks - k.masks;
22562258

22572259
ret = hop ?

0 commit comments

Comments
 (0)