aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/module.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 795bdc7f5c3..b9d0667efe6 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2290,8 +2290,7 @@ static int copy_and_check(struct load_info *info,
2290 return -ENOEXEC; 2290 return -ENOEXEC;
2291 2291
2292 /* Suck in entire file: we'll want most of it. */ 2292 /* Suck in entire file: we'll want most of it. */
2293 /* vmalloc barfs on "unusual" numbers. Check here */ 2293 if ((hdr = vmalloc(len)) == NULL)
2294 if (len > 64 * 1024 * 1024 || (hdr = vmalloc(len)) == NULL)
2295 return -ENOMEM; 2294 return -ENOMEM;
2296 2295
2297 if (copy_from_user(hdr, umod, len) != 0) { 2296 if (copy_from_user(hdr, umod, len) != 0) {