Received: by 10.192.165.156 with SMTP id m28csp1502222imm; Mon, 16 Apr 2018 23:48:16 -0700 (PDT) X-Google-Smtp-Source: AIpwx49hjZ78sjIuOUenCXSHoLzJGQU3EByGl5OfFzAO2WCuAG0To2aiS0jhcko2HsCH2RQ6QV9/ X-Received: by 2002:a17:902:8646:: with SMTP id y6-v6mr932369plt.86.1523947696442; Mon, 16 Apr 2018 23:48:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523947696; cv=none; d=google.com; s=arc-20160816; b=sNHjBmiUsVaUgMgk3P36csXa53q76t/KrhHP6Frme+WKy7NhOvioffz0LRa65O04ho f1U118T2mCV6QR8u2sE4VQ3McpCvPzqtdM0VitNma7LLckkz5fPoX5b7YLV97R0KJdbk XXUFzdb8Fff0eYKR7xjgjrB3sox7jSCTvnT6ihT4YSNO03yYgRQU9zRrUPiztSWF3bps zJe24613MybR+LHUWGsd5Dp7/O429Uwb/llLntZntghECissT44fR5OXHa+71XudE9TL 72gQVfqg2/YnsEDNrHff0x81H2AC0n60zIh2FD8YkgM1a0SbbRDxCNI4SeaNPjaojRAI T4kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=WSl1z5AXdXLeIryT1aBhnkgPwAaxRmkxot44TdBS58s=; b=zOezVXj+3u5jwNX6qTrFAoYzYwVxJz3BQCwMwTAyIvF/QI+T4ByuGjV89zO0tUb3Gq RXLBxPewoe8jfGxPXIWSmw8590OAkYuIQt/Mlu5n/uHOE8HwSSnoEFsm0RFS7/8H+1L7 ZLqMK0zhHv2Olh9bm++5/qMpgPdrPuRksWDq0HTWx12e4Qkj3Dq7rA9fxnGcznnE+5KQ GwrOByVajX7DWPCVAXBa8Ec8+kYZ+siBR7m1cCw/0+VLPQZ31U6Gq1Wlt+c0XjQzsQCA 5MG3tFCyVGa0OTEB8RT74tStPgl5JdeqOsF4ko9aTxmKqShUjb0j4MopvM9IVfzrtdSj p7vQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f59-v6si14260889plf.38.2018.04.16.23.48.02; Mon, 16 Apr 2018 23:48:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751793AbeDQGq3 (ORCPT + 99 others); Tue, 17 Apr 2018 02:46:29 -0400 Received: from mout.gmx.net ([212.227.17.21]:41359 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750967AbeDQGq2 (ORCPT ); Tue, 17 Apr 2018 02:46:28 -0400 Received: from localhost.localdomain ([122.225.81.134]) by mail.gmx.com (mrgmx103 [212.227.17.174]) with ESMTPSA (Nemesis) id 0M55BC-1eEhEh3PEk-00zFT4; Tue, 17 Apr 2018 08:45:10 +0200 From: Chengguang Xu To: ericvh@gmail.com, rminnich@sandia.gov, lucho@ionkov.net Cc: v9fs-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org, Chengguang Xu Subject: [V9fs-developer][PATCH v2 1/2] net/9p: detecting invalid options as much as possible Date: Tue, 17 Apr 2018 14:45:01 +0800 Message-Id: <1523947502-6103-1-git-send-email-cgxu519@gmx.com> X-Mailer: git-send-email 1.8.3.1 X-Provags-ID: V03:K1:91hXpPINVW/K4BPfhQj696ffX2RXy9Ppc586SyUgUhCme9ri47Z tNRHyGBH/9qmD7d7AeW9TZDZ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bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently when detecting invalid options in option parsing, some options(e.g. msize) just set errno and allow to continuously validate other options so that it can detect invalid options as much as possible and give proper error messages together. This patch applies same rule to option 'trans' and 'version' when detecting EINVAL. Signed-off-by: Chengguang Xu --- Changes since v1: - Do not change behavior when detecting ENOMEM or unrecognized options. net/9p/client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/9p/client.c b/net/9p/client.c index 21e6df1..38b02fb 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -199,7 +199,7 @@ static int parse_opts(char *opts, struct p9_client *clnt) s); ret = -EINVAL; kfree(s); - goto free_and_return; + continue; } kfree(s); break; @@ -217,7 +217,7 @@ static int parse_opts(char *opts, struct p9_client *clnt) ret = get_protocol_version(s); if (ret == -EINVAL) { kfree(s); - goto free_and_return; + continue; } kfree(s); clnt->proto_version = ret; -- 1.8.3.1