summaryrefslogtreecommitdiffstats
path: root/kernel/kexec.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-07-02 13:05:10 +0900
committerPaul Mundt <lethal@linux-sh.org>2010-07-02 13:05:10 +0900
commit12462d77ec78be9fb033580b7b64ddf9d0fee44b (patch)
treea21157428d46259ed2c8a727ac12a2e658d8181a /kernel/kexec.c
parent598ee698d9db7beb06e12f4ea9d9a5fbc03a3a77 (diff)
parent97e0214044d9f279a3d6286c9f859696ef0b7ebe (diff)
downloadblackbird-op-linux-12462d77ec78be9fb033580b7b64ddf9d0fee44b.tar.gz
blackbird-op-linux-12462d77ec78be9fb033580b7b64ddf9d0fee44b.zip
Merge branches 'sh/highmem' and 'sh/stable-updates'
Diffstat (limited to 'kernel/kexec.c')
-rw-r--r--kernel/kexec.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c
index 474a84715eac..131b1703936f 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -1089,9 +1089,10 @@ void crash_kexec(struct pt_regs *regs)
size_t crash_get_memory_size(void)
{
- size_t size;
+ size_t size = 0;
mutex_lock(&kexec_mutex);
- size = crashk_res.end - crashk_res.start + 1;
+ if (crashk_res.end != crashk_res.start)
+ size = crashk_res.end - crashk_res.start + 1;
mutex_unlock(&kexec_mutex);
return size;
}
@@ -1134,7 +1135,7 @@ int crash_shrink_memory(unsigned long new_size)
free_reserved_phys_range(end, crashk_res.end);
- if (start == end)
+ if ((start == end) && (crashk_res.parent != NULL))
release_resource(&crashk_res);
crashk_res.end = end - 1;
OpenPOWER on IntegriCloud