[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210813071252.90278-1-xhao@linux.alibaba.com>
Date: Fri, 13 Aug 2021 15:12:52 +0800
From: Xin Hao <xhao@...ux.alibaba.com>
To: tglx@...utronix.de
Cc: mingo@...hat.com, bp@...en8.de, hpa@...or.com, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] x86/kdump: fix wrong judge about crash_size var
The type of crash_size is unsigned long long, so
it can not be less than 0, so there fix it.
Signed-off-by: Xin Hao <xhao@...ux.alibaba.com>
---
arch/x86/kernel/setup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index bff3a784aec5..95b80ec11741 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -472,11 +472,11 @@ static void __init reserve_crashkernel(void)
/* crashkernel=XM */
ret = parse_crashkernel(boot_command_line, total_mem, &crash_size, &crash_base);
- if (ret != 0 || crash_size <= 0) {
+ if (ret != 0 || !crash_size) {
/* crashkernel=X,high */
ret = parse_crashkernel_high(boot_command_line, total_mem,
&crash_size, &crash_base);
- if (ret != 0 || crash_size <= 0)
+ if (ret != 0 || !crash_size)
return;
high = true;
}
--
2.31.0
Powered by blists - more mailing lists