]> xenbits.xensource.com Git - xen.git/commitdiff
x86: fix unintended fallthrough case from XSA-154
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 18 Feb 2016 14:28:25 +0000 (15:28 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 18 Feb 2016 14:28:25 +0000 (15:28 +0100)
... 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

index e6ac37eaf45bee08ae3ee790fb8f83c5b93594f7..1ef7b34aee7add31a9f2fdc2cfeeb542863c01bf 100644 (file)
@@ -827,9 +827,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();
             }