sched/core: Fix comparison in sched_group_cookie_match()
authorLin Shengwang <linshengwang1@huawei.com>
Sat, 8 Oct 2022 02:27:09 +0000 (10:27 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Nov 2022 14:59:15 +0000 (23:59 +0900)
commit739eac37ff9cf5d5d416153e562970800afd67dd
tree5241b3be14f333fa2119e46d8e7b17237ac9ab1a
parentca7b0a10287e2733bdafb01ef0d4038536625fe3
sched/core: Fix comparison in sched_group_cookie_match()

[ Upstream commit e705968dd687574b6ca3ebe772683d5642759132 ]

In commit 97886d9dcd86 ("sched: Migration changes for core scheduling"),
sched_group_cookie_match() was added to help determine if a cookie
matches the core state.

However, while it iterates the SMT group, it fails to actually use the
RQ for each of the CPUs iterated, use cpu_rq(cpu) instead of rq to fix
things.

Fixes: 97886d9dcd86 ("sched: Migration changes for core scheduling")
Signed-off-by: Lin Shengwang <linshengwang1@huawei.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20221008022709.642-1-linshengwang1@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/sched/sched.h