Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21199226ybl; Sun, 5 Jan 2020 23:09:43 -0800 (PST) X-Google-Smtp-Source: APXvYqwSaer7wjpy8ajUsGIpK9DF5wzTPIi8YotcY0yOURJvJrC18pcBVrlVTrAEfV7mWfPemo8v X-Received: by 2002:a9d:68cb:: with SMTP id i11mr109140653oto.210.1578294583036; Sun, 05 Jan 2020 23:09:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578294583; cv=none; d=google.com; s=arc-20160816; b=iCrGUsOkp3uTtWlmfmTQiUGlhr7lSmeDYVqV3s0EErdQ9mjRLee6vAJ83kfpqHIZqj laFVUs1KvfXc5o4On/uIH3N0VeeG1HKOVPhca8vM1olMJaJNRrBSJ/jiCpUtc0E492+k T8gNRa4pkv1PcSxjDr0xfcApGHPU97YZo8g4SRKjIScY8xouQrB8jc3zRVPbeCF1vz4o X0rWqwQYiYDmo1tu9mJNcHiPBOEIJ2pKEvIEd8mBMZZfWNBP0yZA+Epmexv8/kwCcXjb ATDm56B2/pLpBGlwZcCKGOMVPXn1537duIxHo9JTHZC9QogXw1M9mJQ+BNcxpAWHbgre AFNQ== 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=cZSFcr/6/NDXfNRf5/C3Serqj4wqjHvHUQIPMvTEhB4=; b=rcu3QPWpGcKLX6tEtMDLsovVzCWQHVAfxwnH3f48ufoepEg9XKBU898jDs1GHiquq0 J7t7nuri8/E2/vSg5hQxKrNOCfFbywE/D11k84X2gJN3dImo1L5C/bV9CtDK4Z06GtZY NmDray7RULLO0HIB23RVF2Ckb+bnOCWeJr5n57hjxm0gk+jaAclpqotbAfJpW4GtNAFK gcCcYaLKIf2WnwqSSmExJzcqg2dbPWynVSH57Z52shXzse9knBD0eyABIehhcgX42Mia FT8x2bkEDYVSQGXi9CRE6ZBrBmXgN0EouQPuNRRRgjhiNT3XHyb5552osbXWX6Ofv4Sx Z9Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=q6euyIR7; 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 b1si31088891otl.302.2020.01.05.23.09.19; Sun, 05 Jan 2020 23:09:43 -0800 (PST) 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=q6euyIR7; 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 S1726668AbgAFHII (ORCPT + 99 others); Mon, 6 Jan 2020 02:08:08 -0500 Received: from mail.skyhub.de ([5.9.137.197]:57460 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726477AbgAFHII (ORCPT ); Mon, 6 Jan 2020 02:08:08 -0500 Received: from zn.tnic (p200300EC2F270F0024DF20D65B514141.dip0.t-ipconnect.de [IPv6:2003:ec:2f27:f00:24df:20d6:5b51:4141]) (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 0258B1EC0B67; Mon, 6 Jan 2020 08:08:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1578294487; 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=cZSFcr/6/NDXfNRf5/C3Serqj4wqjHvHUQIPMvTEhB4=; b=q6euyIR7Ji8hgeAK5l4wMIBf3WAxqPQYMSYQTfik54CnvRxfGAzOFdIryGrA7TGwhLVgKk uC6G37D39f7VfY7LS0GMbc49z03m/Q/xDO5ISJVX3NTmqsAb0fvd0pXjnjB/IJQAsZeZ7W zUvSbphmAFOqpM0HEH149N3cWDY6lfg= Date: Mon, 6 Jan 2020 08:07:59 +0100 From: Borislav Petkov To: Chuansheng Liu Cc: linux-kernel@vger.kernel.org, tony.luck@intel.com, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com Subject: Re: [PATCH] x86/mce/therm_throt: Fix the access of uninitialized therm_work Message-ID: <20200106070759.GB12238@zn.tnic> References: <20200106064155.64-1-chuansheng.liu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200106064155.64-1-chuansheng.liu@intel.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 Mon, Jan 06, 2020 at 06:41:55AM +0000, Chuansheng Liu wrote: > In ICL platform, it is easy to hit bootup failure with panic > in thermal interrupt handler during early bootup stage. > > Such issue makes my platform almost can not boot up with > latest kernel code. > > The call stack is like: > kernel BUG at kernel/timer/timer.c:1152! > > Call Trace: > __queue_delayed_work > queue_delayed_work_on > therm_throt_process > intel_thermal_interrupt > ... > > When one CPU is up, the irq is enabled prior to CPU UP > notification which will then initialize therm_worker. You mean the unmasking of the thermal vector at the end of intel_init_thermal()? If so, why don't you move that to the end of the notifier and unmask it only after all the necessary work like setting up the workqueues etc, is done, and save yourself adding yet another silly bool? -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette