From patchwork Thu Aug 20 09:20:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 265746 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80555C433E1 for ; Thu, 20 Aug 2020 10:08:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4E07620738 for ; Thu, 20 Aug 2020 10:08:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597918092; bh=fZ8ST2yhYEOwdLXirGleANT944jZBPkw2xVYSWUoEMs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=HS88Jfk46rQbpvXkgUSHZcXdYW7VCll5APMvAUhw3054HiQQbKCylY2+sQ31GgLPi Bu89OQZOKczQg1uOZL5navXWnhgaFL5FMJ3zFwlCv0xDGbXIU7QwlGE7Qcbri4dSgn ck+9dBCifH+4NLIACQmZq8EmvvGFKR967hLywl38= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730302AbgHTKIK (ORCPT ); Thu, 20 Aug 2020 06:08:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:39616 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730011AbgHTKIG (ORCPT ); Thu, 20 Aug 2020 06:08:06 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 77B7F2067C; Thu, 20 Aug 2020 10:08:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597918086; bh=fZ8ST2yhYEOwdLXirGleANT944jZBPkw2xVYSWUoEMs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CBfKjuXFFwemq3ACd7dchCf3ITJj9mp3FgU7+DD16cqg+oW83LWJku/bfFH4drQ3+ SBbOEkTvEuUr3wWQxmM2nKHY8AaCIzvNKzs9zx5MiqoZz3mSdvxRSkpipoBMIiDda8 XL/2jCKdMJhfr0v2kV7yR+0fCNIrx4ey0AdKVF3g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peng Liu , "Peter Zijlstra (Intel)" , Vincent Guittot , Valentin Schneider , Sasha Levin Subject: [PATCH 4.14 047/228] sched: correct SD_flags returned by tl->sd_flags() Date: Thu, 20 Aug 2020 11:20:22 +0200 Message-Id: <20200820091609.965787642@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820091607.532711107@linuxfoundation.org> References: <20200820091607.532711107@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Peng Liu [ 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 Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/20200609150936.GA13060@iZj6chx1xj0e0buvshuecpZ Signed-off-by: Sasha Levin --- kernel/sched/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 867d173dab482..152ffe0c24330 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -1117,7 +1117,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; *sd = (struct sched_domain){ .min_interval = sd_weight,