Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2108748ybm; Thu, 23 May 2019 11:29:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqzN1rh0gVO3wFVVKyXBfurZ56NXPPLqAzAOjgky+A8ooncbNGz1/TzoVKZ0CrI7Y1yOA05f X-Received: by 2002:a63:465b:: with SMTP id v27mr98852071pgk.38.1558636193280; Thu, 23 May 2019 11:29:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558636193; cv=none; d=google.com; s=arc-20160816; b=FGfjB5YJFoq7uxUqY8ntTFYOKVpqFDV7B6eMHMaJE7FkUCEKdnIxCh6eePT3/k2PiE SVZnXPXk4Eg4vrFPNRleECg65IpQPUE3XqFAeDFbQSx32U7HOu3SoX/HFjrmPDRlseLC lUwpdgSoB4S1qe92DKW11Z10o4JfqzRCLL+CL5YsD3HgtYzFmNpVqh+4ILfBit0L1aKE hc54aCoYcU163Obl7a47/QcpPq2r/oxhodgfQP7DHpNWi2FDjmEo0QVkZ6CzPoVof7kg GIK5lhb5eh6Axufj6jUBoESP+Ws/LAwv02Myx6tRnRZU0kvneolHXwT/fdtozSIl/1iE OIcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=1dFzXcVh5H3mgKQCZ4xmGQdhf/xiGlb61Su3Uj/Yo6c=; b=S6IpvBfVGpPQ5ArloD1iE2B+BWQEe/6uLI9JpD3NctsDVDWZzaHoRHCpjQatkvoMR6 TVjVACkYZbV8B9W+dZXvCSUxJPjUevgCxkA105vIZakbMvzEhPeIsKPhHzgQDDbAlkWp ecMQllf0pKzc1pBH2i2e64W7bKC6nf01pgIvszNf244KNk4vNu2AftyJ4PLWmWMlQgNO R+MO9kA0SQedPM8Ckm4Ao+ySHAEvDtDtS1fuXbtkI3m/z5yB5cyujcQ24Gph86MoARKJ xyCQZkExJnLoDk1a+6joGJ67AcVU9LKVPzUGH+kNFyDvriHN7nrck1mulshZp3mmx0Qi ijUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=ILlcH0LX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n12si338600plp.114.2019.05.23.11.29.37; Thu, 23 May 2019 11:29:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=ILlcH0LX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731383AbfEWS2a (ORCPT + 99 others); Thu, 23 May 2019 14:28:30 -0400 Received: from mail.skyhub.de ([5.9.137.197]:50202 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731107AbfEWS2a (ORCPT ); Thu, 23 May 2019 14:28:30 -0400 Received: from cz.tnic (unknown [165.204.77.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 8C4C01EC0722; Thu, 23 May 2019 20:28:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1558636108; h=from:from: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:in-reply-to:in-reply-to: references:references; bh=1dFzXcVh5H3mgKQCZ4xmGQdhf/xiGlb61Su3Uj/Yo6c=; b=ILlcH0LXJL/gRjkeOXDR8ELTkSF9fB8PBnYh+hCFeEKx8RnEe6vztTq6GATli7szEoyzSU UEWIWSxA56XlrlkoI6wO6HwRW5jQq+ssIhqVjKWyk+VFdnq6DHBFhemhmoHbTkuqplFFbn sPxFbPUeoS2hjZIA5yehDO7Qqe+Xucw= Date: Thu, 23 May 2019 22:28:17 +0200 From: Borislav Petkov To: "Ghannam, Yazen" Cc: "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "tony.luck@intel.com" , "x86@kernel.org" Subject: Re: [PATCH] x86/MCE: Statically allocate mce_banks_array Message-ID: <20190523202754.GA3980@cz.tnic> References: <20190523150345.42906-1-Yazen.Ghannam@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190523150345.42906-1-Yazen.Ghannam@amd.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 23, 2019 at 03:03:55PM +0000, Ghannam, Yazen wrote: > From: Yazen Ghannam > > The MCE control data is stored in an array of struct mce_banks. This > array has historically been shared by all CPUs and it was allocated > dynamically during the first CPU's init sequence. > > However, starting with > > 5b0883f5c7be ("x86/MCE: Make mce_banks a per-CPU array") > > the array was changed to become a per-CPU array. Each CPU would > dynamically allocate the array during its own init sequence. > > This seems benign expect when "Lock Debugging" config options are > enabled in which case the following message appears. > > BUG: sleeping function called from invalid context at mm/slab.h:418 > > The message appears during the secondary CPUs' init sequences. This seems > to be because these CPUs are in system_state=SYSTEM_SCHEDULING compared > to the primary CPU which is in system_state=SYSTEM_BOOTING. > > Allocate the mce_banks_array statically so that this issue can be > avoided. > > Also, remove the now unnecessary return values from > __mcheck_cpu_mce_banks_init() and __mcheck_cpu_cap_init(). > > Fixes: 5b0883f5c7be ("x86/MCE: Make mce_banks a per-CPU array") > Reported-by: kernel test robot > Suggested-by: Borislav Petkov > Signed-off-by: Yazen Ghannam > --- > arch/x86/kernel/cpu/mce/core.c | 39 ++++++++++++---------------------- > 1 file changed, 14 insertions(+), 25 deletions(-) Can you rediff this patch against tip/master please? It fixes a patch which is already in -rc1 so it needs to go first, into urgent, before your patchset. Thx. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. Srsly.