Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1631507 > unrolled thread
| Started by | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| First post | 2017-04-26 17:00 +0200 |
| Last post | 2017-04-26 17:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] kvm: async_pf: fix rcu_irq_enter() with irqs enabled Paolo Bonzini <pbonzini@redhat.com> - 2017-04-26 17:00 +0200
Re: [PATCH] kvm: async_pf: fix rcu_irq_enter() with irqs enabled "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-26 17:30 +0200
| From | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| Date | 2017-04-26 17:00 +0200 |
| Subject | [PATCH] kvm: async_pf: fix rcu_irq_enter() with irqs enabled |
| Message-ID | <tAwAa-3Ev-21@gated-at.bofh.it> |
native_safe_halt enables interrupts, and you just shouldn't call rcu_irq_enter() with interrupts enabled. Reorder the call with the following local_irq_disable() to respect the invariant. Reported-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- arch/x86/kernel/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 14f65a5f938e..2a7835932b71 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) -- 2.9.3
[toc] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-04-26 17:30 +0200 |
| Message-ID | <tAx3d-46S-47@gated-at.bofh.it> |
| In reply to | #1631507 |
On Wed, Apr 26, 2017 at 04:56:26PM +0200, Paolo Bonzini wrote: > native_safe_halt enables interrupts, and you just shouldn't > call rcu_irq_enter() with interrupts enabled. Reorder the > call with the following local_irq_disable() to respect the > invariant. > > Reported-by: Ross Zwisler <ross.zwisler@linux.intel.com> > Cc: stable@vger.kernel.org > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> > --- > arch/x86/kernel/kvm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c > index 14f65a5f938e..2a7835932b71 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) > -- > 2.9.3 >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web