[kernel/f16] Fix oops in nfs_have_delegation (rhbz 811138)
Josh Boyer
jwboyer at fedoraproject.org
Tue Apr 17 16:47:12 UTC 2012
commit 084e405734acd62ea4dc00c5a09f49bac0e8c6ee
Author: Josh Boyer <jwboyer at redhat.com>
Date: Tue Apr 17 12:43:28 2012 -0400
Fix oops in nfs_have_delegation (rhbz 811138)
...-cleanups-for-nfs4_handle_exception-and-n.patch | 51 ++++++++++++++++++++
kernel.spec | 3 +
2 files changed, 54 insertions(+), 0 deletions(-)
---
diff --git a/NFSv4-Minor-cleanups-for-nfs4_handle_exception-and-n.patch b/NFSv4-Minor-cleanups-for-nfs4_handle_exception-and-n.patch
new file mode 100644
index 0000000..1052351
--- /dev/null
+++ b/NFSv4-Minor-cleanups-for-nfs4_handle_exception-and-n.patch
@@ -0,0 +1,51 @@
+From 14977489ffdb80d4caf5a184ba41b23b02fbacd9 Mon Sep 17 00:00:00 2001
+From: Trond Myklebust <Trond.Myklebust at netapp.com>
+Date: Tue, 27 Mar 2012 18:31:25 -0400
+Subject: [PATCH] NFSv4: Minor cleanups for nfs4_handle_exception and
+ nfs4_async_handle_error
+
+Signed-off-by: Trond Myklebust <Trond.Myklebust at netapp.com>
+---
+ fs/nfs/nfs4proc.c | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
+index 1933e67..f82bde0 100644
+--- a/fs/nfs/nfs4proc.c
++++ b/fs/nfs/nfs4proc.c
+@@ -270,7 +270,7 @@ static int nfs4_handle_exception(struct nfs_server *server, int errorcode, struc
+ case 0:
+ return 0;
+ case -NFS4ERR_OPENMODE:
+- if (nfs_have_delegation(inode, FMODE_READ)) {
++ if (inode && nfs_have_delegation(inode, FMODE_READ)) {
+ nfs_inode_return_delegation(inode);
+ exception->retry = 1;
+ return 0;
+@@ -282,10 +282,9 @@ static int nfs4_handle_exception(struct nfs_server *server, int errorcode, struc
+ case -NFS4ERR_DELEG_REVOKED:
+ case -NFS4ERR_ADMIN_REVOKED:
+ case -NFS4ERR_BAD_STATEID:
+- if (state != NULL)
+- nfs_remove_bad_delegation(state->inode);
+ if (state == NULL)
+ break;
++ nfs_remove_bad_delegation(state->inode);
+ nfs4_schedule_stateid_recovery(server, state);
+ goto wait_on_recovery;
+ case -NFS4ERR_EXPIRED:
+@@ -3825,8 +3824,9 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server,
+ case -NFS4ERR_DELEG_REVOKED:
+ case -NFS4ERR_ADMIN_REVOKED:
+ case -NFS4ERR_BAD_STATEID:
+- if (state != NULL)
+- nfs_remove_bad_delegation(state->inode);
++ if (state == NULL)
++ break;
++ nfs_remove_bad_delegation(state->inode);
+ case -NFS4ERR_OPENMODE:
+ if (state == NULL)
+ break;
+--
+1.7.7.6
+
diff --git a/kernel.spec b/kernel.spec
index c30f85a..423f3ba 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -719,6 +719,7 @@ Patch3500: jbd-jbd2-validate-sb-s_first-in-journal_get_superblo.patch
# NFSv4
Patch4000: NFSv4-Reduce-the-footprint-of-the-idmapper.patch
Patch4001: NFSv4-Further-reduce-the-footprint-of-the-idmapper.patch
+Patch4107: NFSv4-Minor-cleanups-for-nfs4_handle_exception-and-n.patch
# patches headed upstream
@@ -1331,6 +1332,7 @@ ApplyPatch jbd-jbd2-validate-sb-s_first-in-journal_get_superblo.patch
# NFSv4
ApplyPatch NFSv4-Reduce-the-footprint-of-the-idmapper.patch
ApplyPatch NFSv4-Further-reduce-the-footprint-of-the-idmapper.patch
+ApplyPatch NFSv4-Minor-cleanups-for-nfs4_handle_exception-and-n.patch
# USB
@@ -2228,6 +2230,7 @@ fi
%changelog
* Tue Apr 17 2012 Josh Boyer <jwboyer at redhat.com>
+- Fix oops in nfs_have_delegation (rhbz 811138)
- Fix oops on invalid AMD microcode load (rhbz 797559)
* Sat Apr 14 2012 Josh Boyer <jwboyer at redhat.com>
More information about the scm-commits
mailing list