All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>,
	Xiao Guangrong <guangrong.xiao@linux.intel.com>,
	kvm@vger.kernel.org, Dan Williams <dan.j.williams@intel.com>
Subject: Re: suspicious RCU usage
Date: Mon, 6 Mar 2017 14:04:34 -0700	[thread overview]
Message-ID: <20170306210434.GA14434@linux.intel.com> (raw)
In-Reply-To: <87ebb08e-944d-6305-c60e-2f062f1876ef@redhat.com>

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

      reply	other threads:[~2017-03-06 21:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-25  3:44 suspicious RCU usage Ross Zwisler
2017-02-28 11:06 ` Paolo Bonzini
2017-03-06 21:04   ` Ross Zwisler [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=20170306210434.GA14434@linux.intel.com \
    --to=ross.zwisler@linux.intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=guangrong.xiao@linux.intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.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.