Skip to contentSkip to conversation

kexec: Use error path if crash region range can't be accessed

PATCH New Simon Horman 1 participant 1 message Feb 27, 2008 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kexec: Use error path if crash region range can't be accessed

Although the error handling path in xen_machine_kexec_setup_resource() is somewhat minmal, it ought to be used if HYPERVISOR_kexec_op() fails when getting the crash kernel region, as this indicates that an error occured, not that the crash kernel region is empty.

---
Tue, 26 Feb 2008 13:56:10 +0900
- sent to xen-ia64-devel

Wed, 27 Feb 2008 13:03:46 +0900
- resent to xen-devel as it is generic code

drivers/xen/core/machine_kexec.c +1 -1
Index: linux-2.6.18-xen.hg/drivers/xen/core/machine_kexec.c
===================================================================
@@ -85,7 +85,7 @@ void __init xen_machine_kexec_setup_reso
 	range.range = KEXEC_RANGE_MA_CRASH;
 
 	if (HYPERVISOR_kexec_op(KEXEC_CMD_kexec_get_range, &range))
-		return;
+		goto err;
 
 	if (range.size) {
 		crashk_res.start = range.start;