* [PATCH] x86/hvm: Fix operator precedence bug introduced by 3d4d4f9336
@ 2014-09-03 12:23 Andrew Cooper
0 siblings, 0 replies; only message in thread
From: Andrew Cooper @ 2014-09-03 12:23 UTC (permalink / raw)
To: Xen-devel; +Cc: Andrew Cooper, Tim Deegan, Jan Beulich, Tamas K Lengyel
Bitwise or has greater precedence than the ternary operator, making the result
of the expression a constant P2M_UNSHARE.
Coverity-ID: 1234633
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Jan Beulich <JBeulich@suse.com>
CC: Tim Deegan <tim@xen.org>
CC: Tamas K Lengyel <tamas.lengyel@zentific.com>
---
xen/arch/x86/hvm/hvm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 83e6fae..8d905d3 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -2796,7 +2796,7 @@ int hvm_hap_nested_page_fault(paddr_t gpa, unsigned long gla,
p2m = p2m_get_hostp2m(v->domain);
mfn = get_gfn_type_access(p2m, gfn, &p2mt, &p2ma,
- P2M_ALLOC | npfec.write_access ? P2M_UNSHARE : 0,
+ P2M_ALLOC | (npfec.write_access ? P2M_UNSHARE : 0),
NULL);
/* Check access permissions first, then handle faults */
--
1.7.10.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-09-03 12:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-03 12:23 [PATCH] x86/hvm: Fix operator precedence bug introduced by 3d4d4f9336 Andrew Cooper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).