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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A43A2C352A8 for ; Mon, 18 Apr 2022 14:08:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344600AbiDROKi (ORCPT ); Mon, 18 Apr 2022 10:10:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240494AbiDRNyh (ORCPT ); Mon, 18 Apr 2022 09:54:37 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F6EC340CC; Mon, 18 Apr 2022 06:04:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CF818B80EE3; Mon, 18 Apr 2022 13:04:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40789C385A7; Mon, 18 Apr 2022 13:04:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650287059; bh=c2nFA8pWcF1wck2porVqACnhPUD/oy8w1AoDwnuG2Nk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lu7Nwg3AelCkezGRa+hbkNA5tgvvkh0MwDp2KRdn3x5J7VCiJWgpUWcs3hXZFEx8/ hxEFB+aO16g0MseBifXxZkN0FmRLw/Tyoighpl3S6Xk/cT+YkKX2/aAjnT4KvkAjDG Bn5D8cxrkKSXnY06IXW0xr+8u7vQm+0cLdep54CU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Randy Dunlap , Igor Zhbanov , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 4.9 046/218] PM: hibernate: fix __setup handler error handling Date: Mon, 18 Apr 2022 14:11:52 +0200 Message-Id: <20220418121200.917897300@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121158.636999985@linuxfoundation.org> References: <20220418121158.636999985@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Dunlap [ Upstream commit ba7ffcd4c4da374b0f64666354eeeda7d3827131 ] If an invalid value is used in "resumedelay=", it is silently ignored. Add a warning message and then let the __setup handler return 1 to indicate that the kernel command line option has been handled. Fixes: 317cf7e5e85e3 ("PM / hibernate: convert simple_strtoul to kstrtoul") Signed-off-by: Randy Dunlap Reported-by: Igor Zhbanov Link: lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- kernel/power/hibernate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index e938fd8db056..c17b953f1294 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c @@ -1185,7 +1185,7 @@ static int __init resumedelay_setup(char *str) int rc = kstrtouint(str, 0, &resume_delay); if (rc) - return rc; + pr_warn("resumedelay: bad option string '%s'\n", str); return 1; } -- 2.34.1