diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-09 17:52:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-09 17:52:09 -0500 |
commit | 3979491701cfb2aa7477f5baf40553355391418b (patch) | |
tree | 4eafd59af4fd75e646598e581abb4d41e030fef2 /fs | |
parent | 6b684cd5799cd1e691024ca3a688d1cdec9d4824 (diff) | |
parent | 3ec07aa9522e3d5e9d5ede7bef946756e623a0a0 (diff) |
Merge branch 'for-2.6.38' of git://linux-nfs.org/~bfields/linux
* 'for-2.6.38' of git://linux-nfs.org/~bfields/linux:
nfsd: wrong index used in inner loop
nfsd4: fix bad pointer on failure to find delegation
NFSD: fix decode_cb_sequence4resok
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/nfs4callback.c | 2 | ||||
-rw-r--r-- | fs/nfsd/nfs4state.c | 13 | ||||
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 4 |
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 54b60bfceb8d..7b566ec14e18 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -2445,15 +2445,16 @@ nfs4_check_delegmode(struct nfs4_delegation *dp, int flags) | |||
2445 | static struct nfs4_delegation * | 2445 | static struct nfs4_delegation * |
2446 | find_delegation_file(struct nfs4_file *fp, stateid_t *stid) | 2446 | find_delegation_file(struct nfs4_file *fp, stateid_t *stid) |
2447 | { | 2447 | { |
2448 | struct nfs4_delegation *dp = NULL; | 2448 | struct nfs4_delegation *dp; |
2449 | 2449 | ||
2450 | spin_lock(&recall_lock); | 2450 | spin_lock(&recall_lock); |
2451 | list_for_each_entry(dp, &fp->fi_delegations, dl_perfile) { | 2451 | list_for_each_entry(dp, &fp->fi_delegations, dl_perfile) |
2452 | if (dp->dl_stateid.si_stateownerid == stid->si_stateownerid) | 2452 | if (dp->dl_stateid.si_stateownerid == stid->si_stateownerid) { |
2453 | break; | 2453 | spin_unlock(&recall_lock); |
2454 | } | 2454 | return dp; |
2455 | } | ||
2455 | spin_unlock(&recall_lock); | 2456 | spin_unlock(&recall_lock); |
2456 | return dp; | 2457 | return NULL; |
2457 | } | 2458 | } |
2458 | 2459 | ||
2459 | int share_access_to_flags(u32 share_access) | 2460 | int 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: |