summaryrefslogtreecommitdiffstats
path: root/kernel/crash_reserve.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/crash_reserve.c')
-rw-r--r--kernel/crash_reserve.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/crash_reserve.c b/kernel/crash_reserve.c
index 64d44a52c011..a620fb4b2116 100644
--- a/kernel/crash_reserve.c
+++ b/kernel/crash_reserve.c
@@ -335,6 +335,9 @@ int __init parse_crashkernel(char *cmdline,
if (!*crash_size)
ret = -EINVAL;
+ if (*crash_size >= system_ram)
+ ret = -EINVAL;
+
return ret;
}