KVM: PPC: fix a sanity check
Subsystems (4)
PATCH 1/1 KVM: PPC: fix a sanity check
We use logical negate where bitwise negate was intended. It means that we never return -EINVAL here.
Fixes ce11e48b7fdd ('KVM: PPC: E500: Add userspace debug stub support')
Signed-off-by Dan Carpenter <[email protected]>
arch/powerpc/kvm/booke.c +1 -1
@@ -2038,7 +2038,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu,if (type =KVMPPC_DEBUG_NONE )continue ; -if (type & !(KVMPPC_DEBUG_WATCH_READ | +if (type & ~(KVMPPC_DEBUG_WATCH_READ |KVMPPC_DEBUG_WATCH_WRITE |KVMPPC_DEBUG_BREAKPOINT ))return -EINVAL ;
Quoted 5 lines · Dan Carpenter
We use logical negate where bitwise negate was intended. It means that we never return
-EINVALhere.Fixes ce11e48b7fdd ('KVM: PPC: E500: Add userspace debug stub support')Signed-off-by Dan Carpenter <[email protected]>
Oops :).
Reviewed-by Alexander Graf <[email protected]>
Alex
Paul Mackerras
AppliedQuoted 5 lines · Dan Carpenter
We use logical negate where bitwise negate was intended. It means that we never return
-EINVALhere.Fixes ce11e48b7fdd ('KVM: PPC: E500: Add userspace debug stub support')Signed-off-by Dan Carpenter <[email protected]>
Thanks, applied to kvm-ppc-next.
Paul.