Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284420
b: refs/heads/master
c: bec013c
h: refs/heads/master
v: v3
  • Loading branch information
Michael Holzheu authored and Linus Torvalds committed Jan 13, 2012
1 parent c03b9e3 commit e5a9be6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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: 6480e5a0923756b500634d9777ec4189492fbbfe
refs/heads/master: bec013c40bc89671d8d457944fdf7d2b8e79d651
9 changes: 4 additions & 5 deletions trunk/kernel/kexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,7 @@ int crash_shrink_memory(unsigned long new_size)
{
int ret = 0;
unsigned long start, end;
unsigned long old_size;
struct resource *ram_res;

mutex_lock(&kexec_mutex);
Expand All @@ -1139,11 +1140,9 @@ int crash_shrink_memory(unsigned long new_size)
}
start = crashk_res.start;
end = crashk_res.end;

if (new_size >= end - start + 1) {
ret = -EINVAL;
if (new_size == end - start + 1)
ret = 0;
old_size = (end == 0) ? 0 : end - start + 1;
if (new_size >= old_size) {
ret = (new_size == old_size) ? 0 : -EINVAL;
goto unlock;
}

Expand Down

0 comments on commit e5a9be6

Please sign in to comment.