Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp981336pxb; Wed, 6 Apr 2022 05:59:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQZgEgB2Tro/17lHr+X4UyNmoZwjb6mNbEy0LJPrVLPGTvQgTBB66YewMz+11LCqs6AYe/ X-Received: by 2002:a17:903:110c:b0:14d:8859:5c8 with SMTP id n12-20020a170903110c00b0014d885905c8mr8332726plh.156.1649249959388; Wed, 06 Apr 2022 05:59:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649249959; cv=none; d=google.com; s=arc-20160816; b=beqMasue9w3FM9zn+cpQPj9/IEii+1OHC/ex+GZTgZ4dZoDlfB6Xdq5e2BXoAw8Llq BnayMkCZ5nZG/WGEyjnyTgX86MM4JWZ69zPI7kkA+XW5PKiC4e9oOH7PIGDE5TQnA4d2 hCETKSbcdoiy3oxW/8s0F+L5GTelzPNB4F+tEwcJ3BYYSB128LXxcnmIKBCVt6/6UzgR S9b0yNZktEoV9JXvoD0s80Brpd9EyBCQ7jUzGhfh2MlAboc1YXJhLra2SEqXqKHh97W7 tJBjQUvHG316y13rgNKPTUKsmi/Au/+u+f/F7YGzqCcL0wHVxh3a3Dq1cvKb6EFngNVU AU+g== 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=B1dHKyRU/UQyuQ1YCk4KrsezTtf4EWOYj+d1p3JZ14Y=; b=HL56PQmc4MAcyzTVYRY/jTv3MqhljaEI/H1H8F35olAbnNaR+MsvshRrqfIOFU7ubt /Ns0RkNQgwUYEHksahQOicpwx/Y1TEaYQoZSbprllQ1rASOja/tYdTYOVyF8uN/f/eiN kF8hd0f3injisy1tzRPT5PflgaSiQk3klEHNNpxwhM25AsnhQpou+bgZUtRiJDruEhAP /0iu4kQ4KqLr5NM/wE0NoJ/WQezBWXxgkMRRCWjo71/puBmJiRaCxtSKj7t7fw2zTQ54 liMPCEp3vO45hz/55jJB/lVZMoPNcNG1HIo6rdMzsfvs/NhYU+QQQTxyd41AocRqfofh Df8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Z4uzVuDn; 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 c21-20020a170902b69500b00156eeb5cd6bsi1080472pls.562.2022.04.06.05.59.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:59:19 -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=Z4uzVuDn; 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 out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0CBB556E457; Wed, 6 Apr 2022 03:11:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1839506AbiDFBER (ORCPT + 99 others); Tue, 5 Apr 2022 21:04:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349515AbiDEJuC (ORCPT ); Tue, 5 Apr 2022 05:50:02 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FBF51E4; Tue, 5 Apr 2022 02:48: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 ams.source.kernel.org (Postfix) with ESMTPS id 0A3B6B817D3; Tue, 5 Apr 2022 09:48:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71748C385A1; Tue, 5 Apr 2022 09:48:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649152081; bh=fc6qrim3UwwCoexjObybUivRCYC7le7SVED3R4kDhpI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z4uzVuDnNbP9Bh98NTca+00dAM+XkdJgkpJ0VPkCoMYrupFqYFAKFi1kNkrdMzcxM dLSrlAr4h47qv7iIUxnFaPoz22MBjFLdb6rKl1BR5TtwX8du2lyTiw51Za0Y/ddyPC ldIoSkXHDG61BXbfwTzgFOSxCvLtT/rnqkAWmcPg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Feng Tang , "Rafael J. Wysocki" , Igor Zhbanov , Randy Dunlap , Sasha Levin Subject: [PATCH 5.15 647/913] driver core: dd: fix return value of __setup handler Date: Tue, 5 Apr 2022 09:28:29 +0200 Message-Id: <20220405070359.233405152@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 f2aad54703dbe630f9d8b235eb58e8c8cc78f37d ] When "driver_async_probe=nulltty" is used on the kernel boot command line, it causes an Unknown parameter message and the string is added to init's environment strings, polluting them. Unknown kernel command line parameters "BOOT_IMAGE=/boot/bzImage-517rc6 driver_async_probe=nulltty", will be passed to user space. Run /sbin/init as init process with arguments: /sbin/init with environment: HOME=/ TERM=linux BOOT_IMAGE=/boot/bzImage-517rc6 driver_async_probe=nulltty Change the return value of the __setup function to 1 to indicate that the __setup option has been handled. Link: lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru Fixes: 1ea61b68d0f8 ("async: Add cmdline option to specify drivers to be async probed") Cc: Feng Tang Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Reported-by: Igor Zhbanov Reviewed-by: Feng Tang Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20220301041829.15137-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/base/dd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 6b6630693201..64ce42b6c6b6 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -809,7 +809,7 @@ static int __init save_async_options(char *buf) pr_warn("Too long list of driver names for 'driver_async_probe'!\n"); strlcpy(async_probe_drv_names, buf, ASYNC_DRV_NAMES_MAX_LEN); - return 0; + return 1; } __setup("driver_async_probe=", save_async_options); -- 2.34.1