Skip to contentSkip to conversation

x86/altp2m: add missing break

PATCH In review Roger Pau Monne 2 participants 2 messages Apr 15, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/altp2m: add missing break

Add a missing break in the HVMOP_altp2m_set_visibility case, or else code flow will continue into the default case and trigger the assert.

Fixes 3fd3e9303ec4b1 ('x86/altp2m: hypercall to set altp2m view visibility')

Coverity-ID: 1461759

---
 xen/arch/x86/hvm/hvm.c | 1 +
 1 file changed, 1 insertion(+)
xen/arch/x86/hvm/hvm.c +1 -0
index 6f6f3f73a8..45959d3412 100644
@@ -4798,6 +4798,7 @@ static int do_altp2m_op(
         else
             rc = p2m_set_altp2m_view_visibility(d, idx,
                                                 a.u.set_visibility.visible);
+        break;
     }
 
     default:
Signature · 1 line
2.26.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Roger Pau Monne

Add a missing break in the HVMOP_altp2m_set_visibility case, or else code flow will continue into the default case and trigger the assert.

Fixes 3fd3e9303ec4b1 ('x86/altp2m: hypercall to set altp2m view visibility')

Coverity-ID: 1461759