From: Thomas Gleixner <tglx@linutronix.de>
To: Matthew Wilcox <willy@infradead.org>
Cc: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>,
kvm@vger.kernel.org, linux-mm@kvack.org,
Borislav Petkov <bp@suse.de>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [4.18.0 rc8 BUG] possible irq lock inversion dependency detected
Date: Sat, 11 Aug 2018 15:14:38 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.21.1808111511200.3202@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20180811113039.GA10397@bombadil.infradead.org>
On Sat, 11 Aug 2018, Matthew Wilcox wrote:
> On Sat, Aug 11, 2018 at 12:28:24PM +0500, Mikhail Gavrilov wrote:
> > Hi guys.
> > I am catched new bug. It occured when I start virtual machine.
> > Can anyone look?
>
> I'd suggest that st->lock should be taken with irqsave. Like this;
> please test.
That should fix it, but that's suboptimal because that's an extra
safe/restore in switch_to(). So we better disable interrupts at the other
call site. Patch below.
Thanks,
tglx
8<------------------
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 30ca2d1a9231..07ce27082a40 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -416,9 +416,11 @@ static __always_inline void __speculative_store_bypass_update(unsigned long tifn
void speculative_store_bypass_update(unsigned long tif)
{
- preempt_disable();
+ unsigned long flags;
+
+ local_irq_save(flags);
__speculative_store_bypass_update(tif);
- preempt_enable();
+ local_irq_restore(flags);
}
void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p,
next prev parent reply other threads:[~2018-08-11 13:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-11 7:28 Mikhail Gavrilov
2018-08-11 11:30 ` Matthew Wilcox
2018-08-11 13:14 ` Thomas Gleixner [this message]
2018-08-11 13:56 ` Thomas Gleixner
2018-08-11 15:44 ` Mikhail Gavrilov
2018-08-11 18:19 ` Thomas Gleixner
2018-08-11 19:44 ` Mikhail Gavrilov
2018-08-11 20:16 ` 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.1808111511200.3202@nanos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=bp@suse.de \
--cc=konrad.wilk@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mikhail.v.gavrilov@gmail.com \
--cc=willy@infradead.org \
/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