Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ac0e89bb authored by Dan Carpenter's avatar Dan Carpenter Committed by Paul Mackerras
Browse files

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: ce11e48b ('KVM: PPC: E500: Add userspace debug stub support')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarAlexander Graf <agraf@suse.de>
Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
parent b009031f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;