All of lore.kernel.org
 help / color / mirror / Atom feed
* + ncpfs-fix-error-return-code-in-ncp_parse_options.patch added to -mm tree
@ 2013-07-08 20:46 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2013-07-08 20:46 UTC (permalink / raw)
  To: mm-commits, petr, yongjun_wei

Subject: + ncpfs-fix-error-return-code-in-ncp_parse_options.patch added to -mm tree
To: yongjun_wei@trendmicro.com.cn,petr@vandrovec.name
From: akpm@linux-foundation.org
Date: Mon, 08 Jul 2013 13:46:39 -0700


The patch titled
     Subject: ncpfs: fix error return code in ncp_parse_options()
has been added to the -mm tree.  Its filename is
     ncpfs-fix-error-return-code-in-ncp_parse_options.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/ncpfs-fix-error-return-code-in-ncp_parse_options.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/ncpfs-fix-error-return-code-in-ncp_parse_options.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Subject: ncpfs: fix error return code in ncp_parse_options()

Fix to return -EINVAL from the option parse error handling case instead of
0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Cc: Petr Vandrovec <petr@vandrovec.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/ncpfs/inode.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff -puN fs/ncpfs/inode.c~ncpfs-fix-error-return-code-in-ncp_parse_options fs/ncpfs/inode.c
--- a/fs/ncpfs/inode.c~ncpfs-fix-error-return-code-in-ncp_parse_options
+++ a/fs/ncpfs/inode.c
@@ -403,18 +403,24 @@ static int ncp_parse_options(struct ncp_
 		switch (optval) {
 			case 'u':
 				data->uid = make_kuid(current_user_ns(), optint);
-				if (!uid_valid(data->uid))
+				if (!uid_valid(data->uid)) {
+					ret = -EINVAL;
 					goto err;
+				}
 				break;
 			case 'g':
 				data->gid = make_kgid(current_user_ns(), optint);
-				if (!gid_valid(data->gid))
+				if (!gid_valid(data->gid)) {
+					ret = -EINVAL;
 					goto err;
+				}
 				break;
 			case 'o':
 				data->mounted_uid = make_kuid(current_user_ns(), optint);
-				if (!uid_valid(data->mounted_uid))
+				if (!uid_valid(data->mounted_uid)) {
+					ret = -EINVAL;
 					goto err;
+				}
 				break;
 			case 'm':
 				data->file_mode = optint;
_

Patches currently in -mm which might be from yongjun_wei@trendmicro.com.cn are

origin.patch
linux-next.patch
ncpfs-fix-error-return-code-in-ncp_parse_options.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-07-08 20:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-08 20:46 + ncpfs-fix-error-return-code-in-ncp_parse_options.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.