Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 348928
b: refs/heads/master
c: 52441fa
h: refs/heads/master
v: v3
  • Loading branch information
Sasha Levin authored and Rusty Russell committed Jan 3, 2013
1 parent d5027f0 commit 3215cc2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f4953fe6c4aeada2d5cafd78aa97587a46d2d8f9
refs/heads/master: 52441fa8f2f1ccc9fa97607c6ccf8b46b9fd15ae
7 changes: 7 additions & 0 deletions trunk/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -2527,6 +2527,13 @@ static int copy_module_from_fd(int fd, struct load_info *info)
err = -EFBIG;
goto out;
}

/* Don't hand 0 to vmalloc, it whines. */
if (stat.size == 0) {
err = -EINVAL;
goto out;
}

info->hdr = vmalloc(stat.size);
if (!info->hdr) {
err = -ENOMEM;
Expand Down

0 comments on commit 3215cc2

Please sign in to comment.