Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp720625pxb; Tue, 5 Apr 2022 20:15:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlRci4kOJqQ5IbmCviCH6cEiQJuqITPzLA3l4tzQwc9Kv/mJuxfgFIuDagsG/fBqdM0yg4 X-Received: by 2002:a05:6a00:8c6:b0:4fe:10df:1cfe with SMTP id s6-20020a056a0008c600b004fe10df1cfemr6856218pfu.18.1649214935869; Tue, 05 Apr 2022 20:15:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649214935; cv=none; d=google.com; s=arc-20160816; b=Irkkvfa1l+8kgizNEkON7zlXCxnw7n5vaYbNbVF8+Ze6G8LFs5YA2SmJcRfNVkAaFC 0kS8YyCQkwimC+ePgLh9evgOynLbrFwO0/Su462vV3yuqVtiLSihH8R22mzapuTvW+uo LH7FqW3I/tYZguH3MssWy6odu4IGm0RKjWhzZGGiAcO0KK0AMieQikC/nsiZo8AXyGy/ t0EpEmOq9fM5r04id6pYDl9BxVsRLzhu8sUZAmLVhltM9jjqF849KUoXuQo54RooMaTE joU965KyuMlvWF3BHPgh2dCTUZDYGB1p6R/Kxr5gq07UumdsPJhC7AC/mnK+CiYw4Mok Jgsg== 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=l1tpsLbjCLmcedomPubFvW9XlyG3tMIX5Gi8OfqUbM7+8ZvEGwRSGHPQ0CSOyABaUQ iS8Lo/p1ihY25U6W2Fg+9kOpiR4I4C5NBmV4Dq0NjZwfrkZMNYz/7lEoGIPNgUjr5Npf xAqn+bfxiwqlIUUftIFNkzxXELd5Qu8dNsEPlB7lF9SjS4N72PV3Rc4AdIY2YoCZdG/P e7JdMF2nOMruT54b/e0CFmy1T9SOEmLmHEmdOWu8g86SGuRXkKECf8g7lvvjhw16JDcL pu2gAyzixw1uaFDrYJZ4pSrafrWhrpsu9acQyFaD+DFl29jXOFLgYEyi7pYdAfeJKXp0 FclQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=O7iuEcjy; 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 g16-20020a63dd50000000b003816043f06bsi14485911pgj.608.2022.04.05.20.15.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 20:15:35 -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=O7iuEcjy; 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BE7E921995C; Tue, 5 Apr 2022 19:53:25 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380140AbiDENN4 (ORCPT + 99 others); Tue, 5 Apr 2022 09:13:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344232AbiDEJSw (ORCPT ); Tue, 5 Apr 2022 05:18:52 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B35B45AF7; Tue, 5 Apr 2022 02:06:01 -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 sin.source.kernel.org (Postfix) with ESMTPS id 70E06CE1BF8; Tue, 5 Apr 2022 09:05:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8AA12C385A1; Tue, 5 Apr 2022 09:05:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149557; bh=fc6qrim3UwwCoexjObybUivRCYC7le7SVED3R4kDhpI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O7iuEcjyYGuE/GrW8D+jpN0bZi/VzXxoi5LHlcMza2aovFkVH+jjB//w4lsMfjSdT 1mZr7xybt0tdRx75EFpNOEpmbWHNIPTsENn+DMvoALfOvl2gBLQe1Jxlw5esPdsn0Q jt1z5r3YKVRBvozBxPDXZOvRvLI+kTJM1obwgBE8= 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.16 0711/1017] driver core: dd: fix return value of __setup handler Date: Tue, 5 Apr 2022 09:27:04 +0200 Message-Id: <20220405070415.375128241@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=-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