Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp701210pxb; Tue, 5 Apr 2022 19:23:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKcL0xocsAreTHvbOgJppPoLcKQjXLV8zjfW9JaKKaAVabSzwGpORAbtqhOxDjLeGgJ3KT X-Received: by 2002:a05:6a00:b95:b0:4fa:ec15:7eb7 with SMTP id g21-20020a056a000b9500b004faec157eb7mr6740401pfj.74.1649211812395; Tue, 05 Apr 2022 19:23:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649211812; cv=none; d=google.com; s=arc-20160816; b=TQqR1tg7vGQtxGWK3U/0B+435h8ARplDMaFsUCRZmtzb16LJRsWzv1fENgPD8Hdk/q dkJFD1lbjzGSvrWysrNu1wFOKWtEhfUQS1ic2MKl1aWbBYjd1mneVqyZF6FHPBfHkeON bQDHuivlGF38aXAmqd9fDqowjf64dK6qiM1bfmJXg/JWxAr8BWL5LjLEc29T/lwtDrdv rJEWK3Wq9Dk/bthL6+Y8XyoQhrrDri17nnngkUUW5rxY+o97g5hPRn8dNrfIC4gMoFna oh9UPtRELHoLs4R9WkvhEqWhH6PdUYCNdfMQYGrU2ATg9+xwQdHSWY5hvQMq3fok5mqX LFJA== 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=SAkKTVeFQ9YOcaXvFicLdYeyvUbNB7PUUB6/5CKPhJo=; b=J3VYijiwLyEJh82Zxcljb8MlIExhFeXxEF7hUUwY7sQLUthxxTeAp28QoelkI0mnpp 0WC+neuhwVlqhomPKcL+cvD5+bjf7lzxFBOPp7i5UQInTGeXq105o7lUf8fBLYSJw98C CawGA/iZ44JS/djcYW49fnNRJkjsLMtavINRymGRScB+4Kb5DSAJOHuRZbAMabcXAQ7O dgomutgtZ2ihE5MEl4CZ9EGxKNFhz5+OpZimG7hxDekffXxBLTgKNiNZAePY/uIBCoos FwzXmMxMoRdkklnPNnr6EfmMSuLbtoUyPvp+hHqHYZHtCvPQrzwJOjZ++//qE7p6xHp2 H9Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=C6HBWRrr; 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 i24-20020a631318000000b003995ad9a355si4308883pgl.545.2022.04.05.19.23.17; Tue, 05 Apr 2022 19:23:32 -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=C6HBWRrr; 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 S242238AbiDELf3 (ORCPT + 99 others); Tue, 5 Apr 2022 07:35:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244708AbiDEIwf (ORCPT ); Tue, 5 Apr 2022 04:52:35 -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 BDB72D95D0; Tue, 5 Apr 2022 01:42:24 -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 532E6609D0; Tue, 5 Apr 2022 08:42:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65276C385A1; Tue, 5 Apr 2022 08:42:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148143; bh=FMqjZnBTFL1ItX9ExSI+O2OIK8U3hGPGIJE5SD3iFNI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C6HBWRrrRylf/awCK4sBdjJ6EGEmnjWJes+dXBFhpN5mdD9OVtpUO1o6o6Bv/OEFw 8EfB1559ptNZCYnkjapOmX3zquaXw62JVGHxAoNvCJuoRu+/i8SyOcaOmm+9GXpErZ nwukiAYCLreqS+Zqk1C1yiPcz1YjPRxRDCobrgdI= 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.16 0249/1017] ACPI: APEI: fix return value of __setup handlers Date: Tue, 5 Apr 2022 09:19:22 +0200 Message-Id: <20220405070401.652458142@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 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 0edc1ed47673..6aef1ee5e1bd 100644 --- a/drivers/acpi/apei/hest.c +++ b/drivers/acpi/apei/hest.c @@ -224,7 +224,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