Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6655702pxb; Wed, 17 Feb 2021 09:48:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJz1VuRHn27GirOvwAvtUho+qxqRNP37FxA1aSt5Yy2+yTZpJPaVzGU4RseHbeN9cuLi/hcj X-Received: by 2002:a17:906:a898:: with SMTP id ha24mr62204ejb.413.1613584124010; Wed, 17 Feb 2021 09:48:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613584124; cv=none; d=google.com; s=arc-20160816; b=gzubCdZpTOIruEO7ELlRAe6KmXWxWh02F8CiOl8GDU1kRJA0iWWIXYPI+iSVd8WhCv DhgWA1kfsUe7uYX2aP/+xX+vS+ZYqHG9EBqM6oD7BgLuNDwDwXKkjkXvaTdeDqKVVYSF UB8eHBV85J3ikgwOBBO4pKYqoIvKGA3nx+OLK8rboqOfawQOYfGks/WlpzchTRakpNj2 H5hiUQAYzYHi2k0/UIXkIxvom49MT8BsvgngWGnaW/4mg8JbFun1qs0NzBvqPxgrUNIn XJ7GArD3pNh/V/ZjhKyc3NBh9YopRs77PjASRY9e4QgcHIVTrA1C/1I8kPd0zZfnYo0U 95qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=U0fYHDJuJETMJsp5SXPR/4h6qRFGQn1sH+35hAaR3KI=; b=CTQU/m4iJyPGTbOaHjcnsnfzWJv789otUmiUr2bTNh4sMejaBHupm7kCRgoW7/lSHV xYgYw5ksmHvNn0lJPBGu53B4eb8+zTnqN7ncnpNnkCsTanAkgT1/iAG2FSLXH9VEVLey x3MVO2FW9VFnoZSJcl/a5Q0WjaBB74O2AL937KrtbN9wmmQQCvID6ir30wqXEDt4vWEb MImHOEeaM1SLhB6By1yJMMHeQy4NlFGXGlXmUS6cpPhPOSkBCH2qPms17E5rstX7Ta/v iejgUrDVSFmk9dckoBGM8YX1Xpa3s4tJsN/IxTWrfBir7FCe9PAlccEzIPNTBvGxHb3O FUjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=wnJ11txN; dkim=neutral (no key) header.i=@linutronix.de header.b=BUEZkqtS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z9si1954714ejn.727.2021.02.17.09.48.19; Wed, 17 Feb 2021 09:48:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=wnJ11txN; dkim=neutral (no key) header.i=@linutronix.de header.b=BUEZkqtS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232720AbhBQNYk (ORCPT + 99 others); Wed, 17 Feb 2021 08:24:40 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:45292 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232846AbhBQNSU (ORCPT ); Wed, 17 Feb 2021 08:18:20 -0500 Date: Wed, 17 Feb 2021 13:17:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1613567857; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=U0fYHDJuJETMJsp5SXPR/4h6qRFGQn1sH+35hAaR3KI=; b=wnJ11txNeBe9r88myasosjfiqBKd57HiAs9qWIb1vFd0xbDknLevsH1ArDpxV3VEBDmVGl h1vvf33ecSl5xYBrCq3yct81e/cIti994aZ7u+jJ1l2XQlWa0d+EMFxS+6jsfYoKOxVmFk 5f+0nRUOPX4rFSqIW6s4gfIu3CrOxC9USmvMrDM0pqk+4vjWQwoJDJCyRiFgmMdfl77Vob mPgMI+p2OC0pqmzej/U0SLFX3TpQDA4ozyBVq5pY+QzjyxDnodxFEcHIVwxchq99hUIkAQ k96Mx0S7nuvSt89lk3mB0aPFE6J2w5HXbbmu576SxDUoQb4d6r8Nt/08LKW01w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1613567857; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=U0fYHDJuJETMJsp5SXPR/4h6qRFGQn1sH+35hAaR3KI=; b=BUEZkqtSjLuVgp3v1RzCbG0K4jnep9jUQ6pdO3ha0Of3d6eh+We1k+XD2bAVA5arGvmr9B wDQhkbBBIs+ZiPCg== From: "tip-bot2 for Dietmar Eggemann" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/topology: Fix sched_domain_topology_level alloc in sched_init_numa() Cc: Dietmar Eggemann , "Peter Zijlstra (Intel)" , Ingo Molnar , Vincent Guittot , Barry Song , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <6000e39e-7d28-c360-9cd6-8798fd22a9bf@arm.com> References: <6000e39e-7d28-c360-9cd6-8798fd22a9bf@arm.com> MIME-Version: 1.0 Message-ID: <161356785681.20312.13022545187499987936.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/core branch of tip: Commit-ID: 71e5f6644fb2f3304fcb310145ded234a37e7cc1 Gitweb: https://git.kernel.org/tip/71e5f6644fb2f3304fcb310145ded234a37e7cc1 Author: Dietmar Eggemann AuthorDate: Mon, 01 Feb 2021 10:53:53 +01:00 Committer: Ingo Molnar CommitterDate: Wed, 17 Feb 2021 14:08:05 +01:00 sched/topology: Fix sched_domain_topology_level alloc in sched_init_numa() Commit "sched/topology: Make sched_init_numa() use a set for the deduplicating sort" allocates 'i + nr_levels (level)' instead of 'i + nr_levels + 1' sched_domain_topology_level. This led to an Oops (on Arm64 juno with CONFIG_SCHED_DEBUG): sched_init_domains build_sched_domains() __free_domain_allocs() __sdt_free() { ... for_each_sd_topology(tl) ... sd = *per_cpu_ptr(sdd->sd, j); <-- ... } Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Vincent Guittot Tested-by: Barry Song Link: https://lkml.kernel.org/r/6000e39e-7d28-c360-9cd6-8798fd22a9bf@arm.com --- 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 bf5c9bd..09d3504 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -1702,7 +1702,7 @@ void sched_init_numa(void) /* Compute default topology size */ for (i = 0; sched_domain_topology[i].mask; i++); - tl = kzalloc((i + nr_levels) * + tl = kzalloc((i + nr_levels + 1) * sizeof(struct sched_domain_topology_level), GFP_KERNEL); if (!tl) return;