Patchwork [tip/core/rcu,2/2] powerpc,kvm: Fix unbalanced srcu_read_[un]lock()

login
register
mail settings
Submitter Paul E. McKenney
Date April 12, 2013, 11:38 p.m.
Message ID <1365809927-23448-2-git-send-email-paulmck@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/236282/
State New
Headers show

Comments

Paul E. McKenney - April 12, 2013, 11:38 p.m.
From: Lai Jiangshan <laijs@cn.fujitsu.com>

At the up_out: label in kvmppc_hv_setup_htab_rma(), srcu_read_lock()
is still held.  This commit therefore have to releases it before return.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Gleb Natapov <gleb@redhat.com>
Cc: Alexander Graf <agraf@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: kvm@vger.kernel.org
Cc: kvm-ppc@vger.kernel.org
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 arch/powerpc/kvm/book3s_hv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index 80dcc53..c26740e 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -1799,7 +1799,7 @@  static int kvmppc_hv_setup_htab_rma(struct kvm_vcpu *vcpu)
 
  up_out:
 	up_read(&current->mm->mmap_sem);
-	goto out;
+	goto out_srcu;
 }
 
 int kvmppc_core_init_vm(struct kvm *kvm)