Commit 39794917 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 6b684cd5 3ec07aa9
...@@ -432,7 +432,7 @@ static int decode_cb_sequence4resok(struct xdr_stream *xdr, ...@@ -432,7 +432,7 @@ static int decode_cb_sequence4resok(struct xdr_stream *xdr,
* If the server returns different values for sessionID, slotID or * If the server returns different values for sessionID, slotID or
* sequence number, the server is looney tunes. * sequence number, the server is looney tunes.
*/ */
p = xdr_inline_decode(xdr, NFS4_MAX_SESSIONID_LEN + 4 + 4); p = xdr_inline_decode(xdr, NFS4_MAX_SESSIONID_LEN + 4 + 4 + 4 + 4);
if (unlikely(p == NULL)) if (unlikely(p == NULL))
goto out_overflow; goto out_overflow;
memcpy(id.data, p, NFS4_MAX_SESSIONID_LEN); memcpy(id.data, p, NFS4_MAX_SESSIONID_LEN);
......
...@@ -2445,15 +2445,16 @@ nfs4_check_delegmode(struct nfs4_delegation *dp, int flags) ...@@ -2445,15 +2445,16 @@ nfs4_check_delegmode(struct nfs4_delegation *dp, int flags)
static struct nfs4_delegation * static struct nfs4_delegation *
find_delegation_file(struct nfs4_file *fp, stateid_t *stid) find_delegation_file(struct nfs4_file *fp, stateid_t *stid)
{ {
struct nfs4_delegation *dp = NULL; struct nfs4_delegation *dp;
spin_lock(&recall_lock); spin_lock(&recall_lock);
list_for_each_entry(dp, &fp->fi_delegations, dl_perfile) { list_for_each_entry(dp, &fp->fi_delegations, dl_perfile)
if (dp->dl_stateid.si_stateownerid == stid->si_stateownerid) if (dp->dl_stateid.si_stateownerid == stid->si_stateownerid) {
break;
}
spin_unlock(&recall_lock); spin_unlock(&recall_lock);
return dp; return dp;
}
spin_unlock(&recall_lock);
return NULL;
} }
int share_access_to_flags(u32 share_access) int share_access_to_flags(u32 share_access)
......
...@@ -1142,7 +1142,7 @@ nfsd4_decode_create_session(struct nfsd4_compoundargs *argp, ...@@ -1142,7 +1142,7 @@ nfsd4_decode_create_session(struct nfsd4_compoundargs *argp,
u32 dummy; u32 dummy;
char *machine_name; char *machine_name;
int i; int i, j;
int nr_secflavs; int nr_secflavs;
READ_BUF(16); READ_BUF(16);
...@@ -1215,7 +1215,7 @@ nfsd4_decode_create_session(struct nfsd4_compoundargs *argp, ...@@ -1215,7 +1215,7 @@ nfsd4_decode_create_session(struct nfsd4_compoundargs *argp,
READ_BUF(4); READ_BUF(4);
READ32(dummy); READ32(dummy);
READ_BUF(dummy * 4); READ_BUF(dummy * 4);
for (i = 0; i < dummy; ++i) for (j = 0; j < dummy; ++j)
READ32(dummy); READ32(dummy);
break; break;
case RPC_AUTH_GSS: case RPC_AUTH_GSS:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment