From: Peng Liu Date: Tue, 9 Jun 2020 15:09:36 +0000 (+0800) Subject: sched: correct SD_flags returned by tl->sd_flags() X-Git-Tag: v5.9-rc1~123^2~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9b1b234bb86bcdcdb142e900d39b599185465dbb;p=thirdparty%2Fkernel%2Flinux.git sched: correct SD_flags returned by tl->sd_flags() During sched domain init, we check whether non-topological SD_flags are returned by tl->sd_flags(), if found, fire a waning and correct the violation, but the code failed to correct the violation. Correct this. Fixes: 143e1e28cb40 ("sched: Rework sched_domain topology definition") Signed-off-by: Peng Liu Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/20200609150936.GA13060@iZj6chx1xj0e0buvshuecpZ --- diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index ba81187bb7af1..9079d865a9357 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -1328,7 +1328,7 @@ sd_init(struct sched_domain_topology_level *tl, sd_flags = (*tl->sd_flags)(); if (WARN_ONCE(sd_flags & ~TOPOLOGY_SD_FLAGS, "wrong sd_flags in topology description\n")) - sd_flags &= ~TOPOLOGY_SD_FLAGS; + sd_flags &= TOPOLOGY_SD_FLAGS; /* Apply detected topology flags */ sd_flags |= dflags;