Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200642
b: refs/heads/master
c: e05bd33
h: refs/heads/master
v: v3
  • Loading branch information
Pavan Naregundi authored and Linus Torvalds committed Jun 29, 2010
1 parent b4c320b commit 323dabf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 482ce512c543f3b30ab881702fa997e71252e604
refs/heads/master: e05bd3367bd3d88715b53766f95bb3a8ec7ab59e
7 changes: 4 additions & 3 deletions trunk/kernel/kexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 323dabf

Please sign in to comment.