From fe71162ab965d4a3344bb867f88e967806c80af5 Mon Sep 17 00:00:00 2001 From: Andrew Cooper <andrew.cooper3@citrix.com> Date: Thu, 18 Feb 2016 15:26:16 +0100 Subject: [PATCH 43/43] x86: fix unintended fallthrough case from XSA-154 ... and annotate the other deliberate one: Coverity objects otherwise. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> One of the two instances was actually a bug. Signed-off-by: Jan Beulich <jbeulich@suse.com> master commit: 8dd6d1c099865ee5f5916616a0ca79cd943c46f9 master date: 2016-02-18 15:10:07 +0100 --- xen/arch/x86/mm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index a25d792..3b52270 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -820,9 +820,11 @@ get_page_from_l1e( case 0: break; case 1: - if ( is_hardware_domain(l1e_owner) ) + if ( !is_hardware_domain(l1e_owner) ) + break; + /* fallthrough */ case -1: - return 0; + return 0; default: ASSERT_UNREACHABLE(); } -- 2.7.2