Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1582080 > unrolled thread

[PATCH 3.16 072/306] KVM: PPC: BookE: Fix a sanity check

Started byBen Hutchings <ben@decadent.org.uk>
First post2017-02-16 01:10 +0100
Last post2017-02-16 01:10 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.16 072/306] KVM: PPC: BookE: Fix a sanity check Ben Hutchings <ben@decadent.org.uk> - 2017-02-16 01:10 +0100

#1582080 — [PATCH 3.16 072/306] KVM: PPC: BookE: Fix a sanity check

FromBen Hutchings <ben@decadent.org.uk>
Date2017-02-16 01:10 +0100
Subject[PATCH 3.16 072/306] KVM: PPC: BookE: Fix a sanity check
Message-ID<tbhO2-6VI-19@gated-at.bofh.it>
3.16.40-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: Dan Carpenter <dan.carpenter@oracle.com>

commit ac0e89bb4744d3882ccd275f2416d9ce22f4e1e7 upstream.

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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 arch/powerpc/kvm/booke.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -1841,7 +1841,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(
 		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;

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web