From: Greg KH <gregkh@linuxfoundation.org>
To: lantianyu1986@gmail.com
Cc: tglx@linutronix.de, mingo@kernel.org, konrad.wilk@oracle.com,
jpoimboe@redhat.com, peterz@infraded.org, mojha@codeaurora.org,
peterz@infradead.org, jkosina@suse.cz, riel@surriel.com,
luto@kernel.org, Tianyu.Lan@microsoft.com,
michael.h.kelley@microsoft.com, kys@microsoft.com,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [Fix PATCH] cpu/hotplug: Fix bug report when add "nosmt" parameter with CONFIG_HOTPLUG_CPU=N
Date: Tue, 26 Mar 2019 04:31:13 +0900 [thread overview]
Message-ID: <20190325193113.GA14852@kroah.com> (raw)
In-Reply-To: <1553521883-20868-1-git-send-email-Tianyu.Lan@microsoft.com>
On Mon, Mar 25, 2019 at 09:51:23PM +0800, lantianyu1986@gmail.com wrote:
> From: Lan Tianyu <Tianyu.Lan@microsoft.com>
>
> When add "nosmt" parameter, kernel still boots up all logical cpus once
> and set CR4.MCE on each CPU. This is to avoid shutting down machine
> when a broadacasted MCE is observed CR4.MCE=0b. (Detail please see comment
> in the cpu_smt_allowed()). Smt cpus will bring up and bring down during
> kernel boot with "nosmt" parameter.
>
> When CONFIG_HOTPLUG_CPU=Y, CPU_DYING callbacks will be called inside
> stop-machine and irq is disabled. This happens in the take_cpu_down()
> callback. When CONFIG_HOTPLUG_CPU=N,CPU_DYING callbacks will be called
> with irq enabled.
>
> smpcfd_dying_cpu() is one of CPU_DYING callbacks and it assumes to be
> called when irq is disabled. smpcfd_dying_cpu() calls flush_smp_call_
> function_queue() which requires to be called with irq disabled.
>
> When CONFIG_HOTPLUG_CPU=N and add "nosmt" parameter, smpcfd_dying_cpu()
> is called with irq enalbed and this triggers BUG_ON(!irqs_disabled())
> in the irq_work_run_list(). This patch is to fix the issue.
>
> Fixes: 0cc3cd21657b ("cpu/hotplug: Boot HT siblings at least once")
> Signed-off-by: Lan Tianyu <Tianyu.Lan@microsoft.com>
> ---
> kernel/smp.c | 5 +++++
> 1 file changed, 5 insertions(+)
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>
prev parent reply other threads:[~2019-03-25 20:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-25 13:51 [Fix PATCH] cpu/hotplug: Fix bug report when add "nosmt" parameter with CONFIG_HOTPLUG_CPU=N lantianyu1986
2019-03-25 14:16 ` Thomas Gleixner
2019-03-25 22:39 ` Thomas Gleixner
2019-03-26 8:44 ` Tianyu Lan
2019-03-25 19:31 ` Greg KH [this message]
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=20190325193113.GA14852@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Tianyu.Lan@microsoft.com \
--cc=jkosina@suse.cz \
--cc=jpoimboe@redhat.com \
--cc=konrad.wilk@oracle.com \
--cc=kys@microsoft.com \
--cc=lantianyu1986@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=michael.h.kelley@microsoft.com \
--cc=mingo@kernel.org \
--cc=mojha@codeaurora.org \
--cc=peterz@infradead.org \
--cc=peterz@infraded.org \
--cc=riel@surriel.com \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).