diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-07-14 10:15:46 (GMT) |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2016-09-27 05:14:29 (GMT) |
commit | ac0e89bb4744d3882ccd275f2416d9ce22f4e1e7 (patch) | |
tree | eb6ff760ea8854dafb3c74c63541696ea1e8056f /arch/powerpc/kvm | |
parent | b009031f74da1c71f306bbe410da78bd9d848669 (diff) | |
download | linux-ac0e89bb4744d3882ccd275f2416d9ce22f4e1e7.tar.xz |
KVM: PPC: BookE: 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 <dan.carpenter@oracle.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r-- | arch/powerpc/kvm/booke.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 02b4672..df3f270 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c @@ -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; |