]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
sched: correct SD_flags returned by tl->sd_flags()
authorPeng Liu <iwtbavbm@gmail.com>
Tue, 9 Jun 2020 15:09:36 +0000 (23:09 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 06:15:54 +0000 (08:15 +0200)
[ Upstream commit 9b1b234bb86bcdcdb142e900d39b599185465dbb ]

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 <iwtbavbm@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
Link: https://lkml.kernel.org/r/20200609150936.GA13060@iZj6chx1xj0e0buvshuecpZ
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/sched/topology.c

index 1fa1e13a5944692735857569f0247583703a7313..ffaa97a8d405148d811aacf93ac6c83e5e618279 100644 (file)
@@ -1333,7 +1333,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;