* [PATCH] arm/arm64: KVM: fix missing unlock on error in kvm_vgic_create()
@ 2015-02-27 11:41 ` weiyj_lk at 163.com
0 siblings, 0 replies; 10+ messages in thread
From: weiyj_lk @ 2015-02-27 11:41 UTC (permalink / raw)
To: Andre Przywara, Christoffer Dall, Marc Zyngier, Gleb Natapov,
Paolo Bonzini
Cc: Wei Yongjun, linux-arm-kernel, kvmarm, kvm
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Add the missing unlock before return from function kvm_vgic_create()
in the error handling case.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
virt/kvm/arm/vgic.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c
index 0cc6ab6..4b2c2e7 100644
--- a/virt/kvm/arm/vgic.c
+++ b/virt/kvm/arm/vgic.c
@@ -1583,8 +1583,10 @@ int kvm_vgic_create(struct kvm *kvm, u32 type)
* emulation. So check this here again. KVM_CREATE_DEVICE does
* the proper checks already.
*/
- if (type == KVM_DEV_TYPE_ARM_VGIC_V2 && !vgic->can_emulate_gicv2)
- return -ENODEV;
+ if (type == KVM_DEV_TYPE_ARM_VGIC_V2 && !vgic->can_emulate_gicv2) {
+ ret = -ENODEV;
+ goto out;
+ }
/*
* Any time a vcpu is run, vcpu_load is called which tries to grab the
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] arm/arm64: KVM: fix missing unlock on error in kvm_vgic_create()
@ 2015-02-27 11:41 ` weiyj_lk at 163.com
0 siblings, 0 replies; 10+ messages in thread
From: weiyj_lk at 163.com @ 2015-02-27 11:41 UTC (permalink / raw)
To: linux-arm-kernel
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Add the missing unlock before return from function kvm_vgic_create()
in the error handling case.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
virt/kvm/arm/vgic.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c
index 0cc6ab6..4b2c2e7 100644
--- a/virt/kvm/arm/vgic.c
+++ b/virt/kvm/arm/vgic.c
@@ -1583,8 +1583,10 @@ int kvm_vgic_create(struct kvm *kvm, u32 type)
* emulation. So check this here again. KVM_CREATE_DEVICE does
* the proper checks already.
*/
- if (type == KVM_DEV_TYPE_ARM_VGIC_V2 && !vgic->can_emulate_gicv2)
- return -ENODEV;
+ if (type == KVM_DEV_TYPE_ARM_VGIC_V2 && !vgic->can_emulate_gicv2) {
+ ret = -ENODEV;
+ goto out;
+ }
/*
* Any time a vcpu is run, vcpu_load is called which tries to grab the
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] arm/arm64: KVM: fix missing unlock on error in kvm_vgic_create()
2015-02-27 11:41 ` weiyj_lk at 163.com
@ 2015-02-27 12:07 ` Andre Przywara
-1 siblings, 0 replies; 10+ messages in thread
From: Andre Przywara @ 2015-02-27 12:07 UTC (permalink / raw)
To: weiyj_lk, Christoffer Dall, Marc Zyngier, Gleb Natapov, Paolo Bonzini
Cc: Wei Yongjun, kvmarm, linux-arm-kernel, kvm
Hi Wei,
On 27/02/15 11:41, weiyj_lk@163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Add the missing unlock before return from function kvm_vgic_create()
> in the error handling case.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> virt/kvm/arm/vgic.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c
> index 0cc6ab6..4b2c2e7 100644
> --- a/virt/kvm/arm/vgic.c
> +++ b/virt/kvm/arm/vgic.c
> @@ -1583,8 +1583,10 @@ int kvm_vgic_create(struct kvm *kvm, u32 type)
> * emulation. So check this here again. KVM_CREATE_DEVICE does
> * the proper checks already.
> */
> - if (type == KVM_DEV_TYPE_ARM_VGIC_V2 && !vgic->can_emulate_gicv2)
> - return -ENODEV;
> + if (type == KVM_DEV_TYPE_ARM_VGIC_V2 && !vgic->can_emulate_gicv2) {
> + ret = -ENODEV;
> + goto out;
> + }
Ah, good catch. Embarrassing that that could slip through ...
Acked-by: Andre Przywara <andre.przywara@arm.com>
Out of curiosity: did you see it hang or was this just by looking at the
code? I thought that I tested this case ...
Cheers,
Andre.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] arm/arm64: KVM: fix missing unlock on error in kvm_vgic_create()
@ 2015-02-27 12:07 ` Andre Przywara
0 siblings, 0 replies; 10+ messages in thread
From: Andre Przywara @ 2015-02-27 12:07 UTC (permalink / raw)
To: linux-arm-kernel
Hi Wei,
On 27/02/15 11:41, weiyj_lk at 163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Add the missing unlock before return from function kvm_vgic_create()
> in the error handling case.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> virt/kvm/arm/vgic.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c
> index 0cc6ab6..4b2c2e7 100644
> --- a/virt/kvm/arm/vgic.c
> +++ b/virt/kvm/arm/vgic.c
> @@ -1583,8 +1583,10 @@ int kvm_vgic_create(struct kvm *kvm, u32 type)
> * emulation. So check this here again. KVM_CREATE_DEVICE does
> * the proper checks already.
> */
> - if (type == KVM_DEV_TYPE_ARM_VGIC_V2 && !vgic->can_emulate_gicv2)
> - return -ENODEV;
> + if (type == KVM_DEV_TYPE_ARM_VGIC_V2 && !vgic->can_emulate_gicv2) {
> + ret = -ENODEV;
> + goto out;
> + }
Ah, good catch. Embarrassing that that could slip through ...
Acked-by: Andre Przywara <andre.przywara@arm.com>
Out of curiosity: did you see it hang or was this just by looking at the
code? I thought that I tested this case ...
Cheers,
Andre.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] arm/arm64: KVM: fix missing unlock on error in kvm_vgic_create()
2015-02-27 11:41 ` weiyj_lk at 163.com
@ 2015-03-02 17:29 ` Christoffer Dall
-1 siblings, 0 replies; 10+ messages in thread
From: Christoffer Dall @ 2015-03-02 17:29 UTC (permalink / raw)
To: weiyj_lk
Cc: Andre Przywara, Marc Zyngier, Gleb Natapov, Paolo Bonzini,
Wei Yongjun, linux-arm-kernel, kvmarm, kvm
On Fri, Feb 27, 2015 at 07:41:45PM +0800, weiyj_lk@163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Add the missing unlock before return from function kvm_vgic_create()
> in the error handling case.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Thanks, applied.
-Christoffer
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] arm/arm64: KVM: fix missing unlock on error in kvm_vgic_create()
@ 2015-03-02 17:29 ` Christoffer Dall
0 siblings, 0 replies; 10+ messages in thread
From: Christoffer Dall @ 2015-03-02 17:29 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Feb 27, 2015 at 07:41:45PM +0800, weiyj_lk at 163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Add the missing unlock before return from function kvm_vgic_create()
> in the error handling case.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Thanks, applied.
-Christoffer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] arm/arm64: KVM: fix missing unlock on error in kvm_vgic_create()
2015-03-02 17:29 ` Christoffer Dall
@ 2015-03-13 10:24 ` Andre Przywara
-1 siblings, 0 replies; 10+ messages in thread
From: Andre Przywara @ 2015-03-13 10:24 UTC (permalink / raw)
To: Christoffer Dall, weiyj_lk
Cc: kvm, Marc Zyngier, Andre Przywara, Gleb Natapov, Wei Yongjun,
Paolo Bonzini, kvmarm, linux-arm-kernel
Hej Christoffer,
On 02/03/15 17:29, Christoffer Dall wrote:
> On Fri, Feb 27, 2015 at 07:41:45PM +0800, weiyj_lk@163.com wrote:
>> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>>
>> Add the missing unlock before return from function kvm_vgic_create()
>> in the error handling case.
>>
>> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Thanks, applied.
Have I missed this or is this patch nor appearing in any of your branches?
Cheers,
Andre.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] arm/arm64: KVM: fix missing unlock on error in kvm_vgic_create()
@ 2015-03-13 10:24 ` Andre Przywara
0 siblings, 0 replies; 10+ messages in thread
From: Andre Przywara @ 2015-03-13 10:24 UTC (permalink / raw)
To: linux-arm-kernel
Hej Christoffer,
On 02/03/15 17:29, Christoffer Dall wrote:
> On Fri, Feb 27, 2015 at 07:41:45PM +0800, weiyj_lk at 163.com wrote:
>> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>>
>> Add the missing unlock before return from function kvm_vgic_create()
>> in the error handling case.
>>
>> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Thanks, applied.
Have I missed this or is this patch nor appearing in any of your branches?
Cheers,
Andre.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] arm/arm64: KVM: fix missing unlock on error in kvm_vgic_create()
2015-03-13 10:24 ` Andre Przywara
@ 2015-03-13 10:41 ` Christoffer Dall
-1 siblings, 0 replies; 10+ messages in thread
From: Christoffer Dall @ 2015-03-13 10:41 UTC (permalink / raw)
To: Andre Przywara
Cc: weiyj_lk, kvm, Marc Zyngier, Gleb Natapov, Wei Yongjun,
Paolo Bonzini, kvmarm, linux-arm-kernel
On Fri, Mar 13, 2015 at 10:24:21AM +0000, Andre Przywara wrote:
> Hej Christoffer,
>
> On 02/03/15 17:29, Christoffer Dall wrote:
> > On Fri, Feb 27, 2015 at 07:41:45PM +0800, weiyj_lk@163.com wrote:
> >> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> >>
> >> Add the missing unlock before return from function kvm_vgic_create()
> >> in the error handling case.
> >>
> >> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> >
> > Thanks, applied.
>
> Have I missed this or is this patch nor appearing in any of your branches?
>
It was on my laptop branch because I applied while being on a plane.
I've updated the kvmarm/master branch with this fix.
Thanks for reminding me.
-Christoffer
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] arm/arm64: KVM: fix missing unlock on error in kvm_vgic_create()
@ 2015-03-13 10:41 ` Christoffer Dall
0 siblings, 0 replies; 10+ messages in thread
From: Christoffer Dall @ 2015-03-13 10:41 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Mar 13, 2015 at 10:24:21AM +0000, Andre Przywara wrote:
> Hej Christoffer,
>
> On 02/03/15 17:29, Christoffer Dall wrote:
> > On Fri, Feb 27, 2015 at 07:41:45PM +0800, weiyj_lk at 163.com wrote:
> >> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> >>
> >> Add the missing unlock before return from function kvm_vgic_create()
> >> in the error handling case.
> >>
> >> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> >
> > Thanks, applied.
>
> Have I missed this or is this patch nor appearing in any of your branches?
>
It was on my laptop branch because I applied while being on a plane.
I've updated the kvmarm/master branch with this fix.
Thanks for reminding me.
-Christoffer
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-03-13 10:41 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-27 11:41 [PATCH] arm/arm64: KVM: fix missing unlock on error in kvm_vgic_create() weiyj_lk
2015-02-27 11:41 ` weiyj_lk at 163.com
2015-02-27 12:07 ` Andre Przywara
2015-02-27 12:07 ` Andre Przywara
2015-03-02 17:29 ` Christoffer Dall
2015-03-02 17:29 ` Christoffer Dall
2015-03-13 10:24 ` Andre Przywara
2015-03-13 10:24 ` Andre Przywara
2015-03-13 10:41 ` Christoffer Dall
2015-03-13 10:41 ` Christoffer Dall
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.