Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208558
b: refs/heads/master
c: f65a03f
h: refs/heads/master
v: v3
  • Loading branch information
Dan Carpenter authored and Linus Torvalds committed Aug 11, 2010
1 parent dcb5729 commit ea4f874
Show file tree
Hide file tree
Showing 2 changed files with 6 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: 832ccf6f44969b616b2aeea25276684cf104fa3b
refs/heads/master: f65a03f6ab6f53a6f2847dbac232dcb38b3b3642
8 changes: 5 additions & 3 deletions trunk/kernel/kexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,10 @@ static int do_kimage_alloc(struct kimage **rimage, unsigned long entry,
image->nr_segments = nr_segments;
segment_bytes = nr_segments * sizeof(*segments);
result = copy_from_user(image->segment, segments, segment_bytes);
if (result)
if (result) {
result = -EFAULT;
goto out;
}

/*
* Verify we have good destination addresses. The caller is
Expand Down Expand Up @@ -827,7 +829,7 @@ static int kimage_load_normal_segment(struct kimage *image,
result = copy_from_user(ptr, buf, uchunk);
kunmap(page);
if (result) {
result = (result < 0) ? result : -EIO;
result = -EFAULT;
goto out;
}
ubytes -= uchunk;
Expand Down Expand Up @@ -882,7 +884,7 @@ static int kimage_load_crash_segment(struct kimage *image,
kexec_flush_icache_page(page);
kunmap(page);
if (result) {
result = (result < 0) ? result : -EIO;
result = -EFAULT;
goto out;
}
ubytes -= uchunk;
Expand Down

0 comments on commit ea4f874

Please sign in to comment.