Linux NFS development
 help / color / mirror / Atom feed
From: bjschuma@netapp.com
To: Trond.Myklebust@netapp.com
Cc: linux-nfs@vger.kernel.org, steved@redhat.com,
	Bryan Schumaker <bjschuma@netapp.com>
Subject: [PATCH v4 2/9] NFS: Handle exceptions coming out of nfs4_proc_fs_locations()
Date: Thu, 26 Apr 2012 16:56:05 -0400	[thread overview]
Message-ID: <1335473772-4401-3-git-send-email-bjschuma@netapp.com> (raw)
In-Reply-To: <1335473772-4401-1-git-send-email-bjschuma@netapp.com>

From: Bryan Schumaker <bjschuma@netapp.com>

We don't want to return -NFS4ERR_WRONGSEC to the VFS because it could
cause the kernel to oops.

Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
---
 fs/nfs/nfs4proc.c |   15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 60d5f4c..0de2614 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4919,7 +4919,7 @@ static void nfs_fixup_referral_attributes(struct nfs_fattr *fattr)
 	fattr->nlink = 2;
 }
 
-int nfs4_proc_fs_locations(struct inode *dir, const struct qstr *name,
+static int _nfs4_proc_fs_locations(struct inode *dir, const struct qstr *name,
 		struct nfs4_fs_locations *fs_locations, struct page *page)
 {
 	struct nfs_server *server = NFS_SERVER(dir);
@@ -4959,6 +4959,19 @@ int nfs4_proc_fs_locations(struct inode *dir, const struct qstr *name,
 	return status;
 }
 
+int nfs4_proc_fs_locations(struct inode *dir, const struct qstr *name,
+		struct nfs4_fs_locations *fs_locations, struct page *page)
+{
+	struct nfs4_exception exception = { };
+	int err;
+	do {
+		err = nfs4_handle_exception(NFS_SERVER(dir),
+				_nfs4_proc_fs_locations(dir, name, fs_locations, page),
+				&exception);
+	} while (exception.retry);
+	return err;
+}
+
 static int _nfs4_proc_secinfo(struct inode *dir, const struct qstr *name, struct nfs4_secinfo_flavors *flavors)
 {
 	int status;
-- 
1.7.10


  parent reply	other threads:[~2012-04-26 20:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-26 20:56 [PATCH v4 0/9] Fix SECINFO procedure bjschuma
2012-04-26 20:56 ` [PATCH v4 1/9] NFS: Fix SECINFO_NO_NAME bjschuma
2012-04-26 20:56 ` bjschuma [this message]
2012-04-26 20:56 ` [PATCH v4 3/9] NFS: Do secinfo as part of lookup bjschuma
2012-04-26 20:56 ` [PATCH v4 4/9] NFS: Fix following referral mount points with different security bjschuma
2012-04-26 20:56 ` [PATCH v4 5/9] NFS: Honor the authflavor set in the clone mount data bjschuma
2012-04-26 20:56 ` [PATCH v4 6/9] NFS: Remove unused function nfs_lookup_with_sec() bjschuma
2012-04-27 16:06   ` Myklebust, Trond
2012-04-27 16:12     ` Bryan Schumaker
2012-04-26 20:56 ` [PATCH v4 7/9] NFS: Remove secinfo knowledge out of the generic client bjschuma
2012-04-26 20:56 ` [PATCH v4 8/9] NFS: Create a submount rpc_op bjschuma
2012-04-26 20:56 ` [PATCH v4 9/9] NFS: Remove extra rpc_clnt argument to proc_lookup bjschuma

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=1335473772-4401-3-git-send-email-bjschuma@netapp.com \
    --to=bjschuma@netapp.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=steved@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox