Skip to content

Commit

Permalink
KVM: PPC: BookE: Fix a sanity check
Browse files Browse the repository at this point in the history
We use logical negate where bitwise negate was intended.  It means that
we never return -EINVAL here.

Fixes: ce11e48 ('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>
  • Loading branch information
Dan Carpenter authored and Paul Mackerras committed Sep 27, 2016
1 parent b009031 commit ac0e89b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/kvm/booke.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ac0e89b

Please sign in to comment.