From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ED6C2C433EF for ; Wed, 30 Mar 2022 11:08:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=YuluE5hy2R8itLs7Why91ZK7J9Ykvj6AOYh+27EyhZc=; b=YJpWNEDKHcP14y tltHOZO4BeDt/98gtbcKh0JhTiPJ3k+VyeYq6n2QVV8MFtXobBKTV21+K5A9hvK17IDEu0rAlpUEB BQ2cogX0IsnXvhORRNcd/vmUJmiv1HsO2+g+LhEah2hWzMiRjR5vvK+cTFC9F8BEKyLySxILLgWc/ mF8mMsMVrsGK+lsICWrvTrnhEzVu3XvOqcr9fDM+GoNIj2hNlx5T5bsiXTW8PZn2cLGSp0QLmu/jX PyYFd9JGjKa4WUQ6sYw9WEufxsIIXp4JUY/E5HeODJSE9TdQ1XJ350ZrRtlehUZX51+1bbO32YzDL l2OxY9bsJ/57N2FshlEg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZWAg-00FJyH-Vj; Wed, 30 Mar 2022 11:07:27 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZWAd-00FJxR-GO for linux-arm-kernel@lists.infradead.org; Wed, 30 Mar 2022 11:07:24 +0000 Received: by mail-pl1-x634.google.com with SMTP id a16so3235583plh.13 for ; Wed, 30 Mar 2022 04:07:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=gZDsx89oNk9ecCZgu7KJS9C8N6zgmIGWjvyPPdJUVi0=; b=TnejDI8s2vmrfhxCxUhC5M3j7UIVNqXIE57QjETShrQX72D2pzHtyrcbdbILuYiPzc 16xnYyTpMWdkkozkXNWU1D9FfFcOBuWAfkzWjfirgrKSh6kRajGOJdb3IhDKHjatNy7q QzskjjJqwYqcDrOE/iTpmbGNY1FE2CX1fAZB44pjK3GfxXw6U6Zp/8X7QiphtwCv0Cnb 9PAmq0U4xkTdYsqOt/svKYyO5h/qnFtvyq8EBH6QPP7IG2cSYgZpP/i46d0/koXKKebg /UPYp3IpqpRGVx+IspqlDWSbnhko80nOHYqj+dvdqKvqzz2HQwg2ZDm9I1lThf1y9vrD 8B2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=gZDsx89oNk9ecCZgu7KJS9C8N6zgmIGWjvyPPdJUVi0=; b=6JVexrrAGY2atOjWWQpvd88LDSmdiIIGcYt74M8JO0UiclfEPJU2rGePf/ABn0ApZB +8qSxbT2bjPledujm/n1qaX9f9NS53wsVPYkK1O7ypGltULTnn9cGbUM6ovKQbOdZC2C yVuMvhVqpFE/c0qwniVYrRWDx6BGlC7bBggWLQz3bbKhGlw2Rbn2RGtZiq2gLC4B2dLO +qUPgx/c3Xn4pH+mpEdlKShvy25vi04Hz6K1yTiAEZfvPgUXUbrv2MmLOU/8aXatv2oh 8s6UiPDODPlnfbkKMXuRH1wsE0Fz/Tk6oOEH2dwA9gbDdTGCND6+uRfSuMcZNo/lcC4T obMQ== X-Gm-Message-State: AOAM5327TryxqfqAEuCR+atLm5C51Yxv7cmxRkCN/ibIoArateoy0mLW lQm8YvCXZqQuYdLg1KNeYYw= X-Google-Smtp-Source: ABdhPJzoPU/cisSRGMv2i5K+JEagW3tINDP53KoRYg78DmzMZiXCvR1SOGs5ZHpFs6iq/dq7o2zjBA== X-Received: by 2002:a17:902:e549:b0:154:b1f8:cc82 with SMTP id n9-20020a170902e54900b00154b1f8cc82mr34909820plf.82.1648638441528; Wed, 30 Mar 2022 04:07:21 -0700 (PDT) Received: from raspberrypi ([49.166.114.232]) by smtp.gmail.com with ESMTPSA id g12-20020a056a001a0c00b004e1307b249csm23383105pfv.69.2022.03.30.04.07.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 04:07:20 -0700 (PDT) Date: Wed, 30 Mar 2022 12:07:15 +0100 From: Austin Kim To: linux@armlinux.org.uk, rmk+kernel@armlinux.org.uk, arnd@arndb.de Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, austin.kim@lge.com, p4ranlee@gmail.com Subject: [PATCH] arm: kdump: add invalid value check for 'crashkernel=' Message-ID: <20220330110715.GA1534@raspberrypi> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220330_040723_586248_A0362114 X-CRM114-Status: GOOD ( 11.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Austin Kim Add invalid value check expression when no crashkernel= or invalid value specified using kdump. Signed-off-by: Austin Kim --- arch/arm/kernel/setup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 039feb7cd590..8018d71ccaed 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -1004,7 +1004,8 @@ static void __init reserve_crashkernel(void) total_mem = get_total_mem(); ret = parse_crashkernel(boot_command_line, total_mem, &crash_size, &crash_base); - if (ret) + /* no crashkernel= or invalid value specified */ + if (ret || !crash_size) return; if (crash_base <= 0) { -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel