Message ID | 20230703230153.19421-1-rdunlap@infradead.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp839573vqx; Mon, 3 Jul 2023 16:02:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlHOAjQpYRIuk/Tu6OVAjcypAJ51PKT3XZY9+AF7iXqa0ITogBblzBd2gcgQnxFOvtJnUs6q X-Received: by 2002:a05:6a21:32a4:b0:12e:f6e6:882b with SMTP id yt36-20020a056a2132a400b0012ef6e6882bmr2600817pzb.1.1688425360367; Mon, 03 Jul 2023 16:02:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688425360; cv=none; d=google.com; s=arc-20160816; b=WBZdRXOMi1Y2bmUHn76LcV7Mv2D6r7h930csuH2+M2EekFD7Af+DXwuZJYtofD50hS wgIKre++nYw9VLU/VS3CYqjvWgKBNpJ4MklaVki+MvedqC8zqAuzERm50ZiPGotxYVXK 5kWDLw5EcF7gS1EiXVDQxCjkRbp5Hv6+LmLRIBj/KlUNnmluc4q3nmCuiE+VMiEsys3X ph55pKXvf9kgqd9dyI4Qf1NroKK0fmwd7+PQtS4k3SBJrUWe+bOWcv2VvGLTWuEe/6tO XNI8lA01VnRoXT5chTyQuN0k8z1OqgAXFgxcC7FrBQHmMzL5YcxbNr74RCQshVOLgPCZ +KrA== 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=rz8+A1sENDx30nELD7mDPWbKVEEZHfOcR63DH9BqkMY=; fh=q6SWf/ztHcQFNdUH8zAFzp56TBfE/VLNTLday8lxEdI=; b=pnJjEvFaYO44/OgVqtKOYbyPrESKxSdCSaOs9iUUd9XG6SKFb9NhRz+vDNUW1KPb0I fc6DVoLdX3KDDVdgIedQk0TvKfJKGb0P6tmoY5LQTa1Mw5UQkDgLUj4rXOwLmfEz2+DJ K2bAb8Ur3AgrSWtPYCu0379ntxLyQM74tEIo3S6H7/of1b86F/Au4e1Td3JsQ8tXtNoK f2QVB0XWW06n0wALgyRdjwpAGRlGobR2J5CJhYQ05Dk0EbzgqU6Ne4WuuyyiYoibfXjB I3FErn3mFUyr0GEdL65TCVujleUWAZ2IJFRTS7nKEFjln8z59ihgyqizRBmL58aTHaJW +iFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=yw0ML96B; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a7-20020a634d07000000b00543ed7b1396si20040746pgb.627.2023.07.03.16.02.27; Mon, 03 Jul 2023 16:02:40 -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=@infradead.org header.s=bombadil.20210309 header.b=yw0ML96B; 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 S230303AbjGCXB6 (ORCPT <rfc822;ivan.orlov0322@gmail.com> + 99 others); Mon, 3 Jul 2023 19:01:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229793AbjGCXB4 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 3 Jul 2023 19:01:56 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 293E3E59; Mon, 3 Jul 2023 16:01:55 -0700 (PDT) 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=rz8+A1sENDx30nELD7mDPWbKVEEZHfOcR63DH9BqkMY=; b=yw0ML96BdG7xwSathwbm+wS47t p4DwtsqssQSGNfaGUdPlAHM7Q6OZ3VsABmoxYxGXw9oI04FpNeVGr1QZVJQkJb6b1WZshhoyMm4NZ sXZ9nZkgYMZA3CFyFleLmkQih8cZsoBRmJ1TjlvMcz5ZEMiWlWkiNS4pYTYJJnRukVJuQo43KacZY zCtV9hHDL3UYNRaxuKQBI8xQezY8pixr+XotPddXjvf5f0pZehMyySOVToscjAPviwHOv+fF3QNpw EcNmjpJuMBUfo3cKtcW3PcnqOYjJldDmuX06IQUvCeX3+Uw7ADXvCIFR3quaJVQrpNzFnHJbOW9SZ eHDQNmLQ==; Received: from [2601:1c2:980:9ec0::2764] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qGSYM-00Bbaq-1h; Mon, 03 Jul 2023 23:01:54 +0000 From: Randy Dunlap <rdunlap@infradead.org> To: linux-kernel@vger.kernel.org Cc: Randy Dunlap <rdunlap@infradead.org>, Igor Zhbanov <izh1979@gmail.com>, "David S. Miller" <davem@davemloft.net>, sparclinux@vger.kernel.org, Dan Carpenter <dan.carpenter@oracle.com>, Nick Alcock <nick.alcock@oracle.com>, Sam Ravnborg <sam@ravnborg.org>, Andrew Morton <akpm@linux-foundation.org>, stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de> Subject: [PATCH v4 RESEND] sparc: vDSO: fix return value of __setup handler Date: Mon, 3 Jul 2023 16:01:53 -0700 Message-ID: <20230703230153.19421-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.41.0 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770442310649352935?= X-GMAIL-MSGID: =?utf-8?q?1770442310649352935?= |
Series |
[v4,RESEND] sparc: vDSO: fix return value of __setup handler
|
|
Commit Message
Randy Dunlap
July 3, 2023, 11:01 p.m. UTC
__setup() handlers should return 1 to obsolete_checksetup() in
init/main.c to indicate that the boot option has been handled.
A return of 0 causes the boot option/value to be listed as an Unknown
kernel parameter and added to init's (limited) argument or environment
strings. Also, error return codes don't mean anything to
obsolete_checksetup() -- only non-zero (usually 1) or zero.
So return 1 from vdso_setup().
Fixes: 9a08862a5d2e ("vDSO for sparc")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Igor Zhbanov <izh1979@gmail.com>
Link: lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru
Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Nick Alcock <nick.alcock@oracle.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: stable@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>
---
v2: correct the Fixes: tag (Dan Carpenter)
v3: add more Cc's;
correct Igor's email address;
change From: Igor to Reported-by: Igor;
v4: add Arnd to Cc: list
arch/sparc/vdso/vma.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff -- a/arch/sparc/vdso/vma.c b/arch/sparc/vdso/vma.c --- a/arch/sparc/vdso/vma.c +++ b/arch/sparc/vdso/vma.c @@ -449,9 +449,8 @@ static __init int vdso_setup(char *s) unsigned long val; err = kstrtoul(s, 10, &val); - if (err) - return err; - vdso_enabled = val; - return 0; + if (!err) + vdso_enabled = val; + return 1; } __setup("vdso=", vdso_setup);