From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ross Zwisler Subject: Re: suspicious RCU usage Date: Mon, 6 Mar 2017 14:04:34 -0700 Message-ID: <20170306210434.GA14434@linux.intel.com> References: <20170225034448.GA15240@linux.intel.com> <87ebb08e-944d-6305-c60e-2f062f1876ef@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Ross Zwisler , Xiao Guangrong , kvm@vger.kernel.org, Dan Williams To: Paolo Bonzini Return-path: Received: from mga09.intel.com ([134.134.136.24]:34103 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754651AbdCFVIA (ORCPT ); Mon, 6 Mar 2017 16:08:00 -0500 Content-Disposition: inline In-Reply-To: <87ebb08e-944d-6305-c60e-2f062f1876ef@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Feb 28, 2017 at 12:06:21PM +0100, Paolo Bonzini wrote: > I think it's just a trivial ordering bug: > > diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c > index 14f65a5f938e..5215629ad692 100644 > --- a/arch/x86/kernel/kvm.c > +++ b/arch/x86/kernel/kvm.c > @@ -161,8 +161,8 @@ void kvm_async_pf_task_wait(u32 token) > */ > rcu_irq_exit(); > native_safe_halt(); > - rcu_irq_enter(); > local_irq_disable(); > + rcu_irq_enter(); > } > } > if (!n.halted) > > > because the async page fault code checks for preempt_disable() already, > and kmap_atomic already does preempt_disable outside pagefault_disable. > > Let me know if the above is enough to fix it for you. Well, unfortunately I can't reproduce the issue with enough reliability to say whether or not the fix is making a difference. :( FWIW, I did re-run my tests with this fix applied, and no new errors cropped up. - Ross