diff options
Diffstat (limited to 'kernel/module.c')
-rw-r--r-- | kernel/module.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/module.c b/kernel/module.c index 294692d8fcd8..78ac6ec1e425 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -2411,8 +2411,7 @@ static int copy_and_check(struct load_info *info, | |||
2411 | return -ENOEXEC; | 2411 | return -ENOEXEC; |
2412 | 2412 | ||
2413 | /* Suck in entire file: we'll want most of it. */ | 2413 | /* Suck in entire file: we'll want most of it. */ |
2414 | /* vmalloc barfs on "unusual" numbers. Check here */ | 2414 | if ((hdr = vmalloc(len)) == NULL) |
2415 | if (len > 64 * 1024 * 1024 || (hdr = vmalloc(len)) == NULL) | ||
2416 | return -ENOMEM; | 2415 | return -ENOMEM; |
2417 | 2416 | ||
2418 | if (copy_from_user(hdr, umod, len) != 0) { | 2417 | if (copy_from_user(hdr, umod, len) != 0) { |