Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp605782pxb; Tue, 5 Apr 2022 15:43:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIFIyB+9C2SsV5PTeor1cEwaxxicTMprOrU7Csi5/e2KJSX9Q8JXr1pPkPNEbaqQv1i1eX X-Received: by 2002:a05:6a00:218d:b0:4fd:f7a4:d4ad with SMTP id h13-20020a056a00218d00b004fdf7a4d4admr5671420pfi.83.1649198634236; Tue, 05 Apr 2022 15:43:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649198634; cv=none; d=google.com; s=arc-20160816; b=aZ8vzhil1EJt63X3vBQg7dgCtnzVCqKHfs2MPk2H9GGw58OU4MW2FR800D/WpWTjKl eXq1YYP8Ab72JFUTqFbOeoNvwW5Bh0JiZ6u7GyNk/wIpxBv3ZgsxaWWHBgQQl7+hGrOh 3Ted3p1ZFYJMOpTZJJ3dr7WC/iyUvdmAOBjjV+m7IRFo9QneZMhlTeuNQakxvLNRgen4 HdScEfafclIuSvXPDC5bbqQGjO/LZefxQ9AvgddhbitNN8ZG7RR4pW4yl+GtKKaxAa2S m+LEEG5i6blpGL8kt+OLX2NlXoFHQnM1suChzzz0o80j0WRP0CbSpu+ZWPG7eRWpLJ+B 2n+A== 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=thDkSv//11KCwx5C/LJE45K4euMcvjcGKcIKDXX68fc=; b=FN86FVK4Baqfe1+bCwA8R68NrDYrEu0wljqvRKytXHIJRIHXqlJhIT3c/DV9dTUREH NaQE7C8/b4m7WZXORKw7LcNwtdqpCyhUCdPTW/wTdvheCLMTSflKbClK+EYxCylwxs9x P88IbCry1VI+5gGtPZWZRVSdJCg43TrT+jEg+IRz/+nHgmi+MDgiZalgkH4QnTSUi3we gL/L9tNbVFoOx8xmbFhg2u2PTS/2LrRCnSyl97MS0bZK1/Ob+6Xqm5PCODjnM+kSkps/ i7nAMK+Z/KGNbgiilnfkGlN9zKbphx9YH8Q9QpOqwTFYbkF4mnxR1vNiuZE6Ttq6UvU3 oMKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CaAgJZkV; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id a13-20020a65418d000000b00398b858c5d4si14155600pgq.525.2022.04.05.15.43.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 15:43:54 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CaAgJZkV; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CC5E87090B; Tue, 5 Apr 2022 15:24:21 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380346AbiDEPAb (ORCPT + 99 others); Tue, 5 Apr 2022 11:00:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344969AbiDEJmw (ORCPT ); Tue, 5 Apr 2022 05:42:52 -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 1345EBF523; Tue, 5 Apr 2022 02:28:14 -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 B34DFB81C6E; Tue, 5 Apr 2022 09:28:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1FC17C385A0; Tue, 5 Apr 2022 09:28:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649150891; bh=pOahPITTi3Rfk2l9K/6i8YQm3NX68W5drANb7VaQ5lA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CaAgJZkV81UZbWXlmUzWR14QXGnZyQCOOfZFD86INP0bZKWTMIRmy3pxJGmYmVhnC hEIAW4e3SlP6oFQ1VjtwVNz/thsYfibBO1XiOVwuSHKVJVRe7BdD3cgXKxVCpOZoq0 7fVeQOBGRANSsmBokkqJMahC5l6XYTGMdstdPNyU= 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.15 219/913] PM: hibernate: fix __setup handler error handling Date: Tue, 5 Apr 2022 09:21:21 +0200 Message-Id: <20220405070346.422532519@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 b0888e9224da..d926852f8119 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c @@ -1326,7 +1326,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