Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp593288pxb; Tue, 5 Apr 2022 15:16:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWBAZHysJ2qGSMtz05K/75vuTW6NbDQWzw5bMJlEhQks9yje/525pZ91nlgWqjdlxf2MJ6 X-Received: by 2002:a05:6a00:140a:b0:4e0:54d5:d01 with SMTP id l10-20020a056a00140a00b004e054d50d01mr5728776pfu.20.1649196975767; Tue, 05 Apr 2022 15:16:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649196975; cv=none; d=google.com; s=arc-20160816; b=Alnhj1PR8JyVoIQqIV8VVUWNnO2+efqeGg1jErh/7QYZsT/+6RTT/p9h8eHaNwL4HD mS0foDkR/fcyzmf5qScx/bseFV6TQIV3P7elxawK+lrEj8WIuIwkQzPzkQngnDvqz0To o0OcxNiM058uRY3ktBkKz4QII+5sKq97aGVlqYC5Q/Jc9x5UfoawPhDs/Bcrz6Y8Fc4a xg7PKmalw6RLElYKNIjL8PcGGF1YTmKlzOmZfb2c+HhZQs+nG8F5JgFCyis2zMOtT/Eu EhwkmZgoYtuEU7fuwzgbCojTvWmF5emlQIzfDk0hD5PlTugahYyEjObIn8zaPLruOYho 4vCg== 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=QFad/ix01CSYEqqXhUF2IsqFzzLSFV0LeErPeMz0pv4=; b=bM8Ki+OaSTI7OtLSZamTh46deMYhsPRNIgSulGMbk7t32C46BL4Kow1DRvN0BSTNOc 3PD8R9Gu2QfqW4cpPgfVi4n2zYwVN37T+2MaKKVKcRm6l0XiG7I5sm/vnKy3P5JhPEsd cMRwlbXq0xJZB+/SVDTM5BIJo62/vxTGW2jKUeIXT7sNCYT4fIpq0L7cBHCioEVjB3TG XdwbdyKu1qEOOP4tPfo7XRxOsHFOZuAPfjuIsS4kqsr7QDUXblGuIrniPJRuc4hiScnJ bpI/zD59KjcS03AmCsVnhMCZPbqANHuhbhiuEoMvj0GAMUvtRryV0DsxkjEOx9Re58nK UdhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mcnwMGHW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t14-20020a17090b018e00b001c6a15fe77bsi2949244pjs.51.2022.04.05.15.16.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 15:16:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mcnwMGHW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 270BF1BA69E; Tue, 5 Apr 2022 14:59:05 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244111AbiDEPJn (ORCPT + 99 others); Tue, 5 Apr 2022 11:09:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345561AbiDEJnh (ORCPT ); Tue, 5 Apr 2022 05:43:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 454CA24962; Tue, 5 Apr 2022 02:29:04 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 70891616B8; Tue, 5 Apr 2022 09:29:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CA83C385A2; Tue, 5 Apr 2022 09:29:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649150943; bh=ogmSP0VJ8hVh33DvkTSFrGD/5ZvXDKOq3AzjEIV5wCo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mcnwMGHWAMoEj+s7Pqrusr9+fLCOMoQPjjRDfolcZakEwvmT05K/tc/sbmE7VzEfi 4hqfRYWbVeyYOaf4d8Jmh2z7j3KzjqBRcs8CBUh4rRzJSOtjbdlTd/u9GZGpv7RPjx OByrQnJcfDwh4nH9PeNdl86/6BVpi3SKBjqtUiwg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Randy Dunlap , Igor Zhbanov , "Huang, Ying" , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 5.15 236/913] ACPI: APEI: fix return value of __setup handlers Date: Tue, 5 Apr 2022 09:21:38 +0200 Message-Id: <20220405070346.929390047@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 f3303ff649dbf7dcdc6a6e1a922235b12b3028f4 ] __setup() handlers should return 1 to indicate that the boot option has been handled. Returning 0 causes a boot option to be listed in the Unknown kernel command line parameters and also added to init's arg list (if no '=' sign) or environment list (if of the form 'a=b'). Unknown kernel command line parameters "erst_disable bert_disable hest_disable BOOT_IMAGE=/boot/bzImage-517rc6", will be passed to user space. Run /sbin/init as init process with arguments: /sbin/init erst_disable bert_disable hest_disable with environment: HOME=/ TERM=linux BOOT_IMAGE=/boot/bzImage-517rc6 Fixes: a3e2acc5e37b ("ACPI / APEI: Add Boot Error Record Table (BERT) support") Fixes: a08f82d08053 ("ACPI, APEI, Error Record Serialization Table (ERST) support") Fixes: 9dc966641677 ("ACPI, APEI, HEST table parsing") Signed-off-by: Randy Dunlap Reported-by: Igor Zhbanov Link: lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru Reviewed-by: "Huang, Ying" Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/apei/bert.c | 2 +- drivers/acpi/apei/erst.c | 2 +- drivers/acpi/apei/hest.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/apei/bert.c b/drivers/acpi/apei/bert.c index 19e50fcbf4d6..86211422f4ee 100644 --- a/drivers/acpi/apei/bert.c +++ b/drivers/acpi/apei/bert.c @@ -77,7 +77,7 @@ static int __init setup_bert_disable(char *str) { bert_disable = 1; - return 0; + return 1; } __setup("bert_disable", setup_bert_disable); diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c index 242f3c2d5533..698d67cee052 100644 --- a/drivers/acpi/apei/erst.c +++ b/drivers/acpi/apei/erst.c @@ -891,7 +891,7 @@ EXPORT_SYMBOL_GPL(erst_clear); static int __init setup_erst_disable(char *str) { erst_disable = 1; - return 0; + return 1; } __setup("erst_disable", setup_erst_disable); diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c index 277f00b288d1..317bba602ad5 100644 --- a/drivers/acpi/apei/hest.c +++ b/drivers/acpi/apei/hest.c @@ -223,7 +223,7 @@ static int __init hest_ghes_dev_register(unsigned int ghes_count) static int __init setup_hest_disable(char *str) { hest_disable = HEST_DISABLED; - return 0; + return 1; } __setup("hest_disable", setup_hest_disable); -- 2.34.1