kvm: don't call panic from signal handlers

throw has to be used in such cases.

PiperOrigin-RevId: 473087177
This commit is contained in:
Andrei Vagin
2022-09-08 14:38:11 -07:00
committed by gVisor bot
parent d8b1136756
commit f7855b28f0
+2 -2
View File
@@ -380,13 +380,13 @@ func (m *machine) mapPhysical(physical, length uintptr, phyRegions []physicalReg
_, physicalStart, length, pr := calculateBluepillFault(physical, phyRegions)
if pr == nil {
// Should never happen.
panic("mapPhysical on unknown physical address")
throw("mapPhysical on unknown physical address")
}
// Is this already mapped? Check the usedSlots.
if !m.hasSlot(physicalStart) {
if _, ok := handleBluepillFault(m, physical, phyRegions); !ok {
panic("handleBluepillFault failed")
throw("handleBluepillFault failed")
}
}