aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2011-03-17 13:07:20 -0400
committerJ. Bruce Fields <bfields@redhat.com>2011-03-17 13:07:25 -0400
commitcf507b6f8ebae89c0e7bbd00abc6d8887c9035b1 (patch)
tree834a5c5bbd63aed0756d47978679d230d5dedec4
parent9ae78bcc000168251f893b1bf92a848308187695 (diff)
parent3ec07aa9522e3d5e9d5ede7bef946756e623a0a0 (diff)
Merge create_session decoding fix into for-2.6.39
This needs a further fixup!
-rw-r--r--fs/nfsd/nfs4callback.c2
-rw-r--r--fs/nfsd/nfs4state.c13
-rw-r--r--fs/nfsd/nfs4xdr.c4
3 files changed, 10 insertions, 9 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index cde36cb0f348..02eb4edf0ece 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -432,7 +432,7 @@ static int decode_cb_sequence4resok(struct xdr_stream *xdr,
432 * If the server returns different values for sessionID, slotID or 432 * If the server returns different values for sessionID, slotID or
433 * sequence number, the server is looney tunes. 433 * sequence number, the server is looney tunes.
434 */ 434 */
435 p = xdr_inline_decode(xdr, NFS4_MAX_SESSIONID_LEN + 4 + 4); 435 p = xdr_inline_decode(xdr, NFS4_MAX_SESSIONID_LEN + 4 + 4 + 4 + 4);
436 if (unlikely(p == NULL)) 436 if (unlikely(p == NULL))
437 goto out_overflow; 437 goto out_overflow;
438 memcpy(id.data, p, NFS4_MAX_SESSIONID_LEN); 438 memcpy(id.data, p, NFS4_MAX_SESSIONID_LEN);
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index a20827804c50..fbde6f79922e 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2446,15 +2446,16 @@ nfs4_check_delegmode(struct nfs4_delegation *dp, int flags)
2446static struct nfs4_delegation * 2446static struct nfs4_delegation *
2447find_delegation_file(struct nfs4_file *fp, stateid_t *stid) 2447find_delegation_file(struct nfs4_file *fp, stateid_t *stid)
2448{ 2448{
2449 struct nfs4_delegation *dp = NULL; 2449 struct nfs4_delegation *dp;
2450 2450
2451 spin_lock(&recall_lock); 2451 spin_lock(&recall_lock);
2452 list_for_each_entry(dp, &fp->fi_delegations, dl_perfile) { 2452 list_for_each_entry(dp, &fp->fi_delegations, dl_perfile)
2453 if (dp->dl_stateid.si_stateownerid == stid->si_stateownerid) 2453 if (dp->dl_stateid.si_stateownerid == stid->si_stateownerid) {
2454 break; 2454 spin_unlock(&recall_lock);
2455 } 2455 return dp;
2456 }
2456 spin_unlock(&recall_lock); 2457 spin_unlock(&recall_lock);
2457 return dp; 2458 return NULL;
2458} 2459}
2459 2460
2460int share_access_to_flags(u32 share_access) 2461int share_access_to_flags(u32 share_access)
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 1275b8655070..615f0a9f0600 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1142,7 +1142,7 @@ nfsd4_decode_create_session(struct nfsd4_compoundargs *argp,
1142 1142
1143 u32 dummy; 1143 u32 dummy;
1144 char *machine_name; 1144 char *machine_name;
1145 int i; 1145 int i, j;
1146 int nr_secflavs; 1146 int nr_secflavs;
1147 1147
1148 READ_BUF(16); 1148 READ_BUF(16);
@@ -1215,7 +1215,7 @@ nfsd4_decode_create_session(struct nfsd4_compoundargs *argp,
1215 READ_BUF(4); 1215 READ_BUF(4);
1216 READ32(dummy); 1216 READ32(dummy);
1217 READ_BUF(dummy * 4); 1217 READ_BUF(dummy * 4);
1218 for (i = 0; i < dummy; ++i) 1218 for (j = 0; j < dummy; ++j)
1219 READ32(dummy); 1219 READ32(dummy);
1220 break; 1220 break;
1221 case RPC_AUTH_GSS: 1221 case RPC_AUTH_GSS: