Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1729778 > unrolled thread

[PATCH 3.16 124/233] kvm: async_pf: fix rcu_irq_enter() with irqs enabled

Started byBen Hutchings <ben@decadent.org.uk>
First post2017-09-10 01:20 +0200
Last post2017-09-10 01:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.16 124/233] kvm: async_pf: fix rcu_irq_enter() with irqs  enabled Ben Hutchings <ben@decadent.org.uk> - 2017-09-10 01:20 +0200

#1729778 — [PATCH 3.16 124/233] kvm: async_pf: fix rcu_irq_enter() with irqs enabled

FromBen Hutchings <ben@decadent.org.uk>
Date2017-09-10 01:20 +0200
Subject[PATCH 3.16 124/233] kvm: async_pf: fix rcu_irq_enter() with irqs enabled
Message-ID<unXcC-3OU-35@gated-at.bofh.it>
3.16.48-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: Paolo Bonzini <pbonzini@redhat.com>

commit bbaf0e2b1c1b4f88abd6ef49576f0efb1734eae5 upstream.

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>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Tested-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 arch/x86/kernel/kvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -160,8 +160,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)

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web