kvm:s390:Fix assumption that kvm_set_irq_routing is always run successfully
Paolo Bonzini
maintainerQuoted 18 lines · Nicholas Krause
This fixes the assumption that
kvm_set_irq_routingis always run successfully by instead making it equal to the variable r which we use for returning in the functionkvm_arch_vm_ioctlinstead of making r equal to zero when calling this particular function and incorrectly making the caller ofkvm_arch_vm_ioctlthink the function has run successfully.Signed-off-by Nicholas Krause <[email protected]>--- arch/s390/kvm/kvm-s390.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)arch/s390/kvm/kvm-s390.c +0
-0
arch/s390/kvm/kvm-s390.c long kvm_arch_vm_ioctl(struct file *filp, · line 885
Quoted 9 lines
arch/s390/kvm/kvm-s390.c +1
-2@@ -879,8 +879,7 @@ long kvm_arch_vm_ioctl(struct file *filp,if (kvm->arch.use_irqchip) {/* Set up dummy routing. */ memset (&routing,0 ,sizeof (routing)); -kvm_set_irq_routing (kvm, &routing,0 ,0 ); - r =0 ; + r =kvm_set_irq_routing (kvm, &routing,0 ,0 ); }break ; }
Seems good.
Paolo
Christian Borntraeger
AppliedAm 06.08.2015 um 19:05 schrieb Nicholas Krause:
Quoted 18 lines
This fixes the assumption that
kvm_set_irq_routingis always run successfully by instead making it equal to the variable r which we use for returning in the functionkvm_arch_vm_ioctlinstead of making r equal to zero when calling this particular function and incorrectly making the caller ofkvm_arch_vm_ioctlthink the function has run successfully.Signed-off-by Nicholas Krause <[email protected]>--- arch/s390/kvm/kvm-s390.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)arch/s390/kvm/kvm-s390.c +0
-0
arch/s390/kvm/kvm-s390.c long kvm_arch_vm_ioctl(struct file *filp, · line 885
Quoted 9 lines
arch/s390/kvm/kvm-s390.c +1
-2@@ -879,8 +879,7 @@ long kvm_arch_vm_ioctl(struct file *filp,if (kvm->arch.use_irqchip) {/* Set up dummy routing. */ memset (&routing,0 ,sizeof (routing)); -kvm_set_irq_routing (kvm, &routing,0 ,0 ); - r =0 ; + r =kvm_set_irq_routing (kvm, &routing,0 ,0 ); }break ; }
Thanks, applied with changed prefix (KVM: s390:)
Paolo Bonzini
maintainerQuoted 6 lines · nick
Quoted 3 lines
Seems good.
Paolo
If it makes it easier for you to trust my patches I can show at least 10 bug fixes for other subsystems to prove that I am trying to do this correctly.
That's up to those maintainers...
I definitely see some improvement in your patches, though I still haven't answered the submissions that in my opinion are a bit more problematic.
Paolo