All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
	Marvin <marvin24@gmx.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Randy Dunlap <randy.dunlap@oracle.com>,
	Jeff Layton <jlayton@redhat.com>
Subject: [GIT PULL] Please pull NFS client bugfixes....
Date: Thu, 07 Jan 2010 15:29:34 -0500	[thread overview]
Message-ID: <1262896174.2659.3.camel@localhost> (raw)

Hi Linus,

Please pull from the "bugfixes" branch of the repository at

   git pull git://git.linux-nfs.org/projects/trondmy/nfs-2.6.git bugfixes

This will update the following files through the appended changesets.

  Cheers,
    Trond

----
 fs/nfs/dir.c                          |    1 +
 net/sunrpc/auth_gss/auth_gss.c        |   17 ++++++++++++++++-
 net/sunrpc/auth_gss/gss_krb5_mech.c   |    4 +++-
 net/sunrpc/auth_gss/gss_mech_switch.c |    2 +-
 4 files changed, 21 insertions(+), 3 deletions(-)

commit 56335936de1a41c8978fde62b2158af77ddc7258
Author: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Date:   Wed Jan 6 18:48:26 2010 -0500

    nfs: fix oops in nfs_rename()
    
    Recent change is missing to update "rehash".  With that change, it will
    become the cause of adding dentry to hash twice.
    
    This explains the reason of Oops (dereference the freed dentry in
    __d_lookup()) on my machine.
    
    Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
    Reported-by: Marvin <marvin24@gmx.de>
    Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

commit 6c8530993e1fdf1d6af0403e796fe14d80b4b097
Author: Randy Dunlap <randy.dunlap@oracle.com>
Date:   Wed Jan 6 17:26:27 2010 -0500

    sunrpc: fix build-time warning
    
    Fix auth_gss printk format warning:
    
    net/sunrpc/auth_gss/auth_gss.c:660: warning: format '%ld' expects type 'long int', but argument 3 has type 'ssize_t'
    
    Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
    Acked-by: Jeff Layton <jlayton@redhat.com>
    Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

commit 486bad2e40e938cd68fd853b7a9fa3115a9d3a4a
Author: Jeff Layton <jlayton@redhat.com>
Date:   Fri Dec 18 16:28:20 2009 -0500

    sunrpc: on successful gss error pipe write, don't return error
    
    When handling the gssd downcall, the kernel should distinguish between a
    successful downcall that contains an error code and a failed downcall
    (i.e. where the parsing failed or some other sort of problem occurred).
    
    In the former case, gss_pipe_downcall should be returning the number of
    bytes written to the pipe instead of an error. In the event of other
    errors, we generally want the initiating task to retry the upcall so
    we set msg.errno to -EAGAIN. An unexpected error code here is a bug
    however, so BUG() in that case.
    
    Signed-off-by: Jeff Layton <jlayton@redhat.com>
    Cc: stable@kernel.org
    Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

commit b891e4a05ef6beac85465295a032431577c66b16
Author: Trond Myklebust <Trond.Myklebust@netapp.com>
Date:   Fri Dec 18 16:28:12 2009 -0500

    SUNRPC: Fix the return value in gss_import_sec_context()
    
    If the context allocation fails, it will return GSS_S_FAILURE, which is
    neither a valid error code, nor is it even negative.
    
    Return ENOMEM instead...
    
    Reported-by: Jeff Layton <jlayton@redhat.com>
    Cc: stable@kernel.org
    Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

commit 14ace024b1e16d2bb9445c8387494fbbd820a738
Author: Trond Myklebust <Trond.Myklebust@netapp.com>
Date:   Fri Dec 18 16:28:05 2009 -0500

    SUNRPC: Fix up an error return value in gss_import_sec_context_kerberos()
    
    If the context allocation fails, the function currently returns a random
    error code, since the variable 'p' still points to a valid memory location.
    
    Ensure that it returns ENOMEM...
    
    Cc: stable@kernel.org
    Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 2c5ace4..3c7f03b 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1615,6 +1615,7 @@ static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry,
 				goto out;
 
 			new_dentry = dentry;
+			rehash = NULL;
 			new_inode = NULL;
 		}
 	}
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index 3c3c50f..f7a7f83 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -644,7 +644,22 @@ gss_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)
 	p = gss_fill_context(p, end, ctx, gss_msg->auth->mech);
 	if (IS_ERR(p)) {
 		err = PTR_ERR(p);
-		gss_msg->msg.errno = (err == -EAGAIN) ? -EAGAIN : -EACCES;
+		switch (err) {
+		case -EACCES:
+			gss_msg->msg.errno = err;
+			err = mlen;
+			break;
+		case -EFAULT:
+		case -ENOMEM:
+		case -EINVAL:
+		case -ENOSYS:
+			gss_msg->msg.errno = -EAGAIN;
+			break;
+		default:
+			printk(KERN_CRIT "%s: bad return from "
+				"gss_fill_context: %zd\n", __func__, err);
+			BUG();
+		}
 		goto err_release_msg;
 	}
 	gss_msg->ctx = gss_get_ctx(ctx);
diff --git a/net/sunrpc/auth_gss/gss_krb5_mech.c b/net/sunrpc/auth_gss/gss_krb5_mech.c
index ef45eba..2deb0ed 100644
--- a/net/sunrpc/auth_gss/gss_krb5_mech.c
+++ b/net/sunrpc/auth_gss/gss_krb5_mech.c
@@ -131,8 +131,10 @@ gss_import_sec_context_kerberos(const void *p,
 	struct	krb5_ctx *ctx;
 	int tmp;
 
-	if (!(ctx = kzalloc(sizeof(*ctx), GFP_NOFS)))
+	if (!(ctx = kzalloc(sizeof(*ctx), GFP_NOFS))) {
+		p = ERR_PTR(-ENOMEM);
 		goto out_err;
+	}
 
 	p = simple_get_bytes(p, end, &ctx->initiate, sizeof(ctx->initiate));
 	if (IS_ERR(p))
diff --git a/net/sunrpc/auth_gss/gss_mech_switch.c b/net/sunrpc/auth_gss/gss_mech_switch.c
index 6efbb0c..76e4c6f 100644
--- a/net/sunrpc/auth_gss/gss_mech_switch.c
+++ b/net/sunrpc/auth_gss/gss_mech_switch.c
@@ -252,7 +252,7 @@ gss_import_sec_context(const void *input_token, size_t bufsize,
 		       struct gss_ctx		**ctx_id)
 {
 	if (!(*ctx_id = kzalloc(sizeof(**ctx_id), GFP_KERNEL)))
-		return GSS_S_FAILURE;
+		return -ENOMEM;
 	(*ctx_id)->mech_type = gss_mech_get(mech);
 
 	return mech->gm_ops


             reply	other threads:[~2010-01-07 20:30 UTC|newest]

Thread overview: 119+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-07 20:29 Trond Myklebust [this message]
2010-01-07 21:00 ` [GIT PULL] Please pull NFS client bugfixes Andi Kleen
2010-01-07 21:23   ` Peter Staubach
2010-01-07 21:35     ` Andi Kleen
2010-01-07 21:53   ` Trond Myklebust
2010-01-07 23:51     ` Andi Kleen
2010-01-08  0:14       ` Trond Myklebust
2010-01-08  0:34         ` Linus Torvalds
2010-01-08  0:45           ` Andi Kleen
2010-01-08  1:03             ` Trond Myklebust
2010-01-08  1:03           ` Trond Myklebust
2010-01-08  1:12             ` Linus Torvalds
2010-01-08  1:22               ` Trond Myklebust
2010-01-08  1:26                 ` Trond Myklebust
2010-01-09  0:56                   ` [RFC PATCH 0/2] Fix up the NFS mmap code Trond Myklebust
2010-01-09  0:56                     ` [RFC PATCH 2/2] NFS: Fix a potential deadlock in nfs_file_mmap() Trond Myklebust
2010-01-09  1:54                       ` Al Viro
2010-01-09  1:54                         ` Al Viro
2010-01-09  0:56                     ` [RFC PATCH 1/2] VFS: Add a mmap_file() callback to struct file_operations Trond Myklebust
2010-01-09  0:56                       ` Trond Myklebust
2010-01-09  1:17                     ` [RFC PATCH 0/2] Fix up the NFS mmap code Linus Torvalds
2010-01-09  1:17                       ` Linus Torvalds
2010-01-09  1:38                       ` Al Viro
2010-01-09  1:38                         ` Al Viro
2010-01-09  1:46                         ` Al Viro
2010-01-09  1:57                         ` Linus Torvalds
2010-01-09  2:11                           ` Al Viro
2010-01-09  2:11                             ` Al Viro
2010-01-09  2:22                             ` Linus Torvalds
2010-01-09  2:30                               ` Al Viro
2010-01-09  2:30                                 ` Al Viro
2010-01-09  2:40                                 ` Al Viro
2010-01-09  2:43                                   ` Al Viro
2010-01-10  2:00                     ` Andi Kleen
2010-01-10  2:00                       ` Andi Kleen
2010-01-08  1:30                 ` [GIT PULL] Please pull NFS client bugfixes Linus Torvalds
2010-01-08  1:35                   ` Linus Torvalds
2010-01-08  2:00                     ` Linus Torvalds
2010-01-14 13:18                       ` Peter Zijlstra
2010-01-08  5:19                   ` Andi Kleen
2010-01-08  1:22               ` Linus Torvalds
2010-01-08  0:43         ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2023-01-07 18:09 Trond Myklebust
2023-01-07 18:43 ` pr-tracker-bot
2022-09-12 21:34 Trond Myklebust
2022-09-12 21:57 ` pr-tracker-bot
2021-01-12 14:31 Trond Myklebust
2021-01-12 18:00 ` pr-tracker-bot
2020-09-28 17:27 Trond Myklebust
2020-09-28 18:16 ` pr-tracker-bot
2020-05-15 21:00 Trond Myklebust
2020-05-15 21:10 ` pr-tracker-bot
2020-05-02 13:35 Trond Myklebust
2020-05-02 18:45 ` pr-tracker-bot
2019-08-27 19:26 Trond Myklebust
2019-08-27 20:55 ` pr-tracker-bot
2019-08-08 21:26 Trond Myklebust
2019-08-09  1:30 ` pr-tracker-bot
2019-06-05 21:02 Schumaker, Anna
2019-04-13 14:56 Trond Myklebust
2019-04-13 22:00 ` pr-tracker-bot
2018-12-19 16:49 Trond Myklebust
2018-12-20  2:50 ` pr-tracker-bot
2018-12-20 15:23 ` Geert Uytterhoeven
2018-03-12 17:29 Trond Myklebust
2018-03-12 17:29 ` Trond Myklebust
2018-02-25 17:02 Trond Myklebust
2018-02-25 17:02 ` Trond Myklebust
2017-01-28 17:04 Trond Myklebust
2017-01-28 17:04 ` Trond Myklebust
2017-01-16 20:14 Trond Myklebust
2017-01-16 20:14 ` Trond Myklebust
2016-10-21 20:30 Anna Schumaker
2015-10-07  2:52 Trond Myklebust
2015-09-25 15:14 Trond Myklebust
2015-07-28 16:03 Trond Myklebust
2015-03-06  3:46 Trond Myklebust
2015-01-29 21:37 Trond Myklebust
2015-01-16 14:35 Trond Myklebust
2014-11-14 23:04 Trond Myklebust
2014-09-19 19:32 Trond Myklebust
2014-01-31 21:41 Trond Myklebust
2013-12-05 17:20 Trond Myklebust
2013-11-16 21:09 Myklebust, Trond
2013-09-30 22:02 Myklebust, Trond
2013-09-30 22:02 ` Myklebust, Trond
2013-05-26 19:29 Myklebust, Trond
2013-03-26 18:26 Myklebust, Trond
2013-03-03  0:08 Myklebust, Trond
2013-02-21  3:38 Myklebust, Trond
2013-01-07 15:45 Myklebust, Trond
2012-11-03 19:48 Myklebust, Trond
2012-11-03 19:48 ` Myklebust, Trond
2012-10-22 17:42 Myklebust, Trond
2012-10-22 17:42 ` Myklebust, Trond
2012-09-12 19:19 Myklebust, Trond
2012-09-12 19:19 ` Myklebust, Trond
2012-07-13 15:14 Myklebust, Trond
2012-07-13 15:14 ` Myklebust, Trond
2012-05-02  3:57 Myklebust, Trond
2012-05-02  3:57 ` Myklebust, Trond
2012-04-24 20:18 [GIT PULL] please " Myklebust, Trond
2012-04-24 20:18 ` Myklebust, Trond
2011-12-20  6:15 [GIT PULL] Please " Trond Myklebust
2011-11-22 11:50 Trond Myklebust
2011-08-19  1:05 Trond Myklebust
2011-07-12 23:30 Trond Myklebust
2011-05-13 20:23 Trond Myklebust
2011-04-08 18:40 [GIT PULL] please " Trond Myklebust
2011-03-14 18:09 [GIT PULL] Please " Trond Myklebust
2010-11-26 18:56 Trond Myklebust
2010-05-26 19:42 Trond Myklebust
2010-05-07  2:22 Trond Myklebust
2010-04-29 16:48 Trond Myklebust
2010-03-23 17:00 Trond Myklebust
2010-03-17 21:55 Trond Myklebust
2010-02-04 19:10 Trond Myklebust
2009-05-26 19:06 Trond Myklebust
2009-05-26 19:06 ` Trond Myklebust

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1262896174.2659.3.camel@localhost \
    --to=trond.myklebust@netapp.com \
    --cc=akpm@linux-foundation.org \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=jlayton@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=marvin24@gmx.de \
    --cc=randy.dunlap@oracle.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.