lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1523947502-6103-1-git-send-email-cgxu519@gmx.com>
Date:   Tue, 17 Apr 2018 14:45:01 +0800
From:   Chengguang Xu <cgxu519@....com>
To:     ericvh@...il.com, rminnich@...dia.gov, lucho@...kov.net
Cc:     v9fs-developer@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
        Chengguang Xu <cgxu519@....com>
Subject: [V9fs-developer][PATCH v2 1/2] net/9p: detecting invalid options as much as possible

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 <cgxu519@....com>
---
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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ