From patchwork Mon May 12 21:16:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 29995 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f197.google.com (mail-ig0-f197.google.com [209.85.213.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CD8A2238EB for ; Mon, 12 May 2014 21:16:55 +0000 (UTC) Received: by mail-ig0-f197.google.com with SMTP id hn18sf14544546igb.0 for ; Mon, 12 May 2014 14:16:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=8TuQsfgApW8Gwn3yfIO6c9zA8jgtjivOII/2kjMD/BE=; b=aiG1fTBBOt3L3D4POJLRtlJYfFEZQuW6lzjByRAccWNBce/jxSE/ARo54cf5Bnnh4K RFEQMl2RTLjQNfvwslK/pPL6dB5gHBz4/lcB10Nzxb97qOl6NMoO5YjWi5w67bjRP4Do KP5YYPbegKrfU09RyGWA10P9U0MFa2iohChQBZcwMjQ11SFPTOjrOsx8BRLaVm/dQi9h yiUclXsvo9G7kDrvOjgaPRX/H/icNDumH+QAge/QjoSEJrdqlWZ2TJWMoc4u4H6CYyIa 0BkJ02QhrSfQeCBmhlDpSSTbafEdc/GoMmBb3QjLOIBmKQpP26lIub18PKcD6FPtUwS8 aw0w== X-Gm-Message-State: ALoCoQmtlfYmFfAG/KD3N5RueJMAmD2AhEic16yKc6Y4yJPsjYdWgoKgSSd96Av2UbQaB7HrjHm8 X-Received: by 10.183.1.7 with SMTP id bc7mr5085836obd.47.1399929415157; Mon, 12 May 2014 14:16:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.27.138 with SMTP id 10ls1070987qgx.9.gmail; Mon, 12 May 2014 14:16:55 -0700 (PDT) X-Received: by 10.52.15.1 with SMTP id t1mr2259238vdc.49.1399929415058; Mon, 12 May 2014 14:16:55 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id af10si2278130vec.77.2014.05.12.14.16.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 May 2014 14:16:55 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id ij19so9865626vcb.28 for ; Mon, 12 May 2014 14:16:55 -0700 (PDT) X-Received: by 10.220.159.4 with SMTP id h4mr25426079vcx.1.1399929414957; Mon, 12 May 2014 14:16:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp99999vcb; Mon, 12 May 2014 14:16:54 -0700 (PDT) X-Received: by 10.66.151.144 with SMTP id uq16mr46951010pab.68.1399929414201; Mon, 12 May 2014 14:16:54 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id uc6si11129739pac.244.2014.05.12.14.16.53; Mon, 12 May 2014 14:16:53 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758652AbaELVQi (ORCPT + 27 others); Mon, 12 May 2014 17:16:38 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:54282 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758392AbaELVQg (ORCPT ); Mon, 12 May 2014 17:16:36 -0400 Received: by mail-wi0-f176.google.com with SMTP id n15so5220935wiw.9 for ; Mon, 12 May 2014 14:16:35 -0700 (PDT) X-Received: by 10.180.36.212 with SMTP id s20mr17471816wij.18.1399929394814; Mon, 12 May 2014 14:16:34 -0700 (PDT) Received: from lmenx30s.st.com. (pas72-3-88-189-71-117.fbx.proxad.net. [88.189.71.117]) by mx.google.com with ESMTPSA id ph8sm19413378wjb.32.2014.05.12.14.16.31 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 May 2014 14:16:32 -0700 (PDT) From: Vincent Guittot To: mingo@kernel.org, peterz@infradead.org, jet.chen@intel.com Cc: fengguang.wu@intel.com, linux-ia64@vger.kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot Subject: sched: fix: initialization of sched_domain_topology for NUMA Date: Mon, 12 May 2014 23:16:16 +0200 Message-Id: <1399929376-4597-1-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: vincent.guittot@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , sched_domain_topology table is a null terminated array. Add 1 row in the allocation size that will be used as the last row of the table. Reported-by: Jet Chen Tested-by: Jet Chen Signed-off-by: Vincent Guittot link: https://lkml.org/lkml/2014/5/12/130 --- Hi Ingo and Peter, This patch fixes the problem that has been reported by Jet Chen Regards, Vincent kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 4ea7b3f..205fa17 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6234,7 +6234,7 @@ static void sched_init_numa(void) /* Compute default topology size */ for (i = 0; sched_domain_topology[i].mask; i++); - tl = kzalloc((i + level) * + tl = kzalloc((i + level + 1) * sizeof(struct sched_domain_topology_level), GFP_KERNEL); if (!tl) return;