All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Cc: Linux List Kernel Mailing <linux-kernel@vger.kernel.org>,
	thomas.lendacky@amd.com
Subject: Re: [5.0.0 rc3 BUG] possible irq lock inversion dependency detected
Date: Sun, 14 Apr 2019 19:51:06 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1904141948200.4917@nanos.tec.linutronix.de> (raw)
In-Reply-To: <CABXGCsMcS+H9jxEotmM3u8F28zhPobvT3+Hd_iWstFQN744v6Q@mail.gmail.com>

Hi,

On Sun, 14 Apr 2019, Mikhail Gavrilov wrote:

> This bug is still present in 5.1 rc4
> Why no one answered me?

Because mails fall through the cracks occasionally.

Does the patch below cure your problem?

Thanks,

	tglx

8<------------------
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -426,6 +426,8 @@ static __always_inline void __speculatio
 	u64 msr = x86_spec_ctrl_base;
 	bool updmsr = false;
 
+	lockdep_assert_irqs_disabled();
+
 	/*
 	 * If TIF_SSBD is different, select the proper mitigation
 	 * method. Note that if SSBD mitigation is disabled or permanentely
@@ -477,10 +479,12 @@ static unsigned long speculation_ctrl_up
 
 void speculation_ctrl_update(unsigned long tif)
 {
+	unsigned long flags;
+
 	/* Forced update. Make sure all relevant TIF flags are different */
-	preempt_disable();
+	local_irq_save(flags);
 	__speculation_ctrl_update(~tif, tif);
-	preempt_enable();
+	local_irq_restore(flags);
 }
 
 /* Called from seccomp/prctl update */

  reply	other threads:[~2019-04-14 17:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-02 18:33 [5.0.0 rc3 BUG] possible irq lock inversion dependency detected Mikhail Gavrilov
2019-04-14 17:33 ` Mikhail Gavrilov
2019-04-14 17:51   ` Thomas Gleixner [this message]
2019-04-14 20:07     ` Mikhail Gavrilov
2019-04-18 16:52       ` Mikhail Gavrilov
2019-04-18 19:17         ` Thomas Gleixner
2019-04-14 21:10     ` [tip:x86/urgent] x86/speculation: Prevent deadlock on ssb_state::lock tip-bot for Thomas Gleixner
     [not found]       ` <20190415130916.BAC1020684@mail.kernel.org>
2019-04-15 16:13         ` Thomas Gleixner

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=alpine.DEB.2.21.1904141948200.4917@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikhail.v.gavrilov@gmail.com \
    --cc=thomas.lendacky@amd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.