提交 ac0e89bb 编写于 作者: D Dan Carpenter 提交者: Paul Mackerras

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: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NAlexander Graf <agraf@suse.de>
Signed-off-by: NPaul Mackerras <paulus@ozlabs.org>
上级 b009031f
...@@ -2038,7 +2038,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu, ...@@ -2038,7 +2038,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu,
if (type == KVMPPC_DEBUG_NONE) if (type == KVMPPC_DEBUG_NONE)
continue; continue;
if (type & !(KVMPPC_DEBUG_WATCH_READ | if (type & ~(KVMPPC_DEBUG_WATCH_READ |
KVMPPC_DEBUG_WATCH_WRITE | KVMPPC_DEBUG_WATCH_WRITE |
KVMPPC_DEBUG_BREAKPOINT)) KVMPPC_DEBUG_BREAKPOINT))
return -EINVAL; return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册