Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3490938pxm; Mon, 28 Feb 2022 22:19:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzKj+zSJxm92TEHrMd905TjjDHOMXicxKMn6nqvh+l9ZiBJEDZdfmiPOvRY91bITe4HG3qs X-Received: by 2002:a17:906:8051:b0:6ce:a85d:ed74 with SMTP id x17-20020a170906805100b006cea85ded74mr18266701ejw.58.1646115552917; Mon, 28 Feb 2022 22:19:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646115552; cv=none; d=google.com; s=arc-20160816; b=LczpTSq10dZgL1Go1P1s9a4OldPv/0vqas5+hsKaC1r2mqp5McbKXYex4vnyIQB4Dr 2d56+eObkmekjCXLFDO0//xYw5ltQjAGh42s8gZOibipvwAEMIRfychE2e8kpYO8WKmw ojyIG0/Acg5jaU9lOWHjDmDFevMYOK58AtlV6rzbF8I5H8Mh1BsK1FOsgru7TdovFmy/ AAeW5O3EX+XJWMZ1IHp8kZBAxXrLwnpmPRi4m3vzzBUeNllU2q0pMWB6VTebsTRUqW5K pVz2lCOxbfz/+VtoIpQCiodcppUowVbdh5Kh90cSi8XPQlvNVdxlAO3Tbt4KJPqPtCMZ RHtw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Wvaf2rS4XOIPWWBrYZGKk5K6I6KgN+6dn1ljHlk2zPs=; b=rO3C75llGrD6DxZ9T0gHGc3NpXur0oKA83DJDaZmtGBVdUWqRro53hoN1QoYflsVwM JHf1WBkuKYAf6+7OcIUnp27Z8gTWLhRZ/InLWkbqNWTSdNX6SN5cPbEIBVLkynhmdFgv 3Re4Ey7PchaxqTwRuV/iOEuxdBADR4lB5EwvpBMtdKfZqFawN0zzrD8NhOoLDpctpeEr eT9IVXyUesr5YONrzr2iHP4VWyR9N8TQSRnoyjt101o0gfbIsj9Twd4qzQVew2oeppDE ehC0EqYlDer9smkzQ/06rwCRvvI4EpLCe9sQNWwrOszjtF7c5fEcU3cwxdnKfYMvphf9 3wuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=SVQP0McG; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fg1-20020a1709069c4100b006cfcd366304si6814958ejc.780.2022.02.28.22.18.48; Mon, 28 Feb 2022 22:19:12 -0800 (PST) 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=@infradead.org header.s=bombadil.20210309 header.b=SVQP0McG; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230254AbiCAETP (ORCPT + 99 others); Mon, 28 Feb 2022 23:19:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbiCAETO (ORCPT ); Mon, 28 Feb 2022 23:19:14 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C6AACEB for ; Mon, 28 Feb 2022 20:18:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=Wvaf2rS4XOIPWWBrYZGKk5K6I6KgN+6dn1ljHlk2zPs=; b=SVQP0McGFuu5OufwsHA4flHsxD 0kXXn8LxZXj2d23U0sUGGTCIw+hfPbFi69d56eYCqYWXYSfBWrvimU/Y4TpsU8p6KF6YNYFS2bDLS M8kdZBlZ0dLmUFi2U0pglwn3tx7klxSygvVfb1hKQSHXzx33n4PIrDgtDHe82jM9+TrXM3BthJgMe HXS4YR4ztraAKWoGeXhX2RwKWqVjqgMb9H7gWacp5G5B7XdkCvFiN5APnvnz6CS7rLkGQ7FBso73U kXvnIJ13uCimrYomvS5GdzD3kmQ9jKmefT5tgjhLDaOf3AmwY2XXCP+ItVAkIxg1ktCen3BydUwRw +FhknsDA==; Received: from [2601:1c0:6280:3f0::aa0b] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOty2-00Eqwn-5p; Tue, 01 Mar 2022 04:18:30 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: patches@lists.linux.dev, Randy Dunlap , Igor Zhbanov , Feng Tang , Greg Kroah-Hartman , "Rafael J. Wysocki" Subject: [PATCH] driver core: dd: fix return value of __setup handler Date: Mon, 28 Feb 2022 20:18:29 -0800 Message-Id: <20220301041829.15137-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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 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. Fixes: 1ea61b68d0f8 ("async: Add cmdline option to specify drivers to be async probed") Signed-off-by: Randy Dunlap Reported-by: Igor Zhbanov Link: lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru Cc: Feng Tang Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" --- drivers/base/dd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-next-20220228.orig/drivers/base/dd.c +++ linux-next-20220228/drivers/base/dd.c @@ -810,7 +810,7 @@ static int __init save_async_options(cha 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);