public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Borislav Petkov <bp@alien8.de>
Cc: Chuansheng Liu <chuansheng.liu@intel.com>,
	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
Date: Mon, 6 Jan 2020 08:11:07 +0100	[thread overview]
Message-ID: <20200106071107.GA95725@gmail.com> (raw)
In-Reply-To: <20200106070759.GB12238@zn.tnic>

* Borislav Petkov <bp@alien8.de> wrote:

> 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?

A debugging WARN_ON_ONCE() when the workqueue is not initialized yet 
would also be useful I suspect. This would turn any remaining race-crash 
boot failure in this area into a warning.

Thanks,

	Ingo

  reply	other threads:[~2020-01-06  7:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-06  6:41 [PATCH] x86/mce/therm_throt: Fix the access of uninitialized therm_work Chuansheng Liu
2020-01-06  7:07 ` Borislav Petkov
2020-01-06  7:11   ` Ingo Molnar [this message]
2020-01-06  9:24     ` Liu, Chuansheng
2020-01-11  4:20     ` Liu, Chuansheng
2020-01-06  9:22   ` Liu, Chuansheng
2020-01-06 10:01     ` Boris Petkov
2020-01-06 10:10       ` Liu, Chuansheng
2020-01-06 10:37         ` Boris Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200106071107.GA95725@gmail.com \
    --to=mingo@kernel.org \
    --cc=bp@alien8.de \
    --cc=chuansheng.liu@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox