Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp661968pxb; Tue, 5 Apr 2022 17:46:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfTFZnNu/BKjN4ndxAG8xYjWucv9Ik/6UcymRH/FJvSiVS+8sHwfjlFL0tD+VtXboCIYME X-Received: by 2002:a17:907:3e8d:b0:6e7:f1fe:5912 with SMTP id hs13-20020a1709073e8d00b006e7f1fe5912mr5974770ejc.314.1649205883481; Tue, 05 Apr 2022 17:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649205883; cv=none; d=google.com; s=arc-20160816; b=Jmkq1Ay1oiS7EQBOHH7sY8wn77n2yAln/AOIjf4Lx6UkE6TbjNP9ghHCsrO15cRlOS LmLJbu2evn+tIiE8wdgogL75mWZrh9SVEV08uUIjfqgOY84hY+YiarYHwdIO9nhHiEk4 zT8O1rQEDxTDaN65Ol6xlqXmnLKooGaUECLL7PDxPTKHVkwawaZ75aJOVNUFaLpH20xm 4VWyYrkKZgc+2wf8UACAozV8W6G84xNXTClujBQo+/PINc8YOD7e8GvrX7K1quYyQVBd 5B7qn6iO4lhiNg8OPgk8CsMdARlBmyBPTZduh+VliMvQIKjF0y0zEGhyC3top/8bYNVx k67Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UPF5OHn+KANjCMjf3VEWJczDtdgJytcNaPIGXLWp2PU=; b=JvHfqcyE/gmZgNJi6cC+viqIK0quyUVSd9WopY7w4mslfJV0csdLlwBM6Jwnx++ynN JjXwWLwnuqfr2+HdTNrlpEY/c1lK0JF3Kp0UBYsqB4F+c1TEYQJg0hq/RtDs1prI6GPB GANc5y6eeNI3m3BzAzieUBI2hRzjCujthFIgzlxUggtZWYI8/xgfXz/fUbefIvpTuIiY r2Ef737tmYBDN3Xr/EPLx0Jl3COF/YN+h0ctdEazBQiITwClgqVDCVn5Q117foZq+KOt VL2m363d6gIgMo9qhH0eeqgpwXgp4ZyXEuCko4E8dDdCjbCamORACixRLLlrrgVb7ShM Qxfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="GIlMa/hp"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gg13-20020a170906e28d00b006e7f84dd48dsi4645620ejb.959.2022.04.05.17.44.17; Tue, 05 Apr 2022 17:44:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="GIlMa/hp"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378445AbiDELeK (ORCPT + 99 others); Tue, 5 Apr 2022 07:34:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244625AbiDEIw2 (ORCPT ); Tue, 5 Apr 2022 04:52:28 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 323ECD763C; Tue, 5 Apr 2022 01:41:33 -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 CBFD9B81A32; Tue, 5 Apr 2022 08:41:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 359C3C385A1; Tue, 5 Apr 2022 08:41:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148091; bh=71jH69m/OVCh7KFUK9MfkwZ2+Xg0lD2a0a291BdIGak=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GIlMa/hpw9blsbSNTpxfWx++KSlqC2OJCROrxswi86CSQ4aOYsG6v/Czb1oyYVc7e onPV1ZgqW832r0lptlwfcKW9Foo5cL50MC9K/TBUCuPjs+OP5ls0W8wRut0fKuR1gW 2n9sd1CwjT+rzYjNCaBuC3mH9z3+o02RWWBPV8q4= 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 5.16 0232/1017] PM: hibernate: fix __setup handler error handling Date: Tue, 5 Apr 2022 09:19:05 +0200 Message-Id: <20220405070401.140965981@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 e6af502c2fd7..08780a466fdf 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c @@ -1328,7 +1328,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