aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorMi Jinlong <mijinlong@cn.fujitsu.com>2011-03-11 12:13:55 +0800
committerJ. Bruce Fields <bfields@redhat.com>2011-03-17 13:09:19 -0400
commit5a02ab7c3c4580f94d13c683721039855b67cda6 (patch)
treeb9a4a8814f4dce7086ae2d0c3d43863d6187aaa1 /fs/nfsd
parentcf507b6f8ebae89c0e7bbd00abc6d8887c9035b1 (diff)
downloadkernel_samsung_smdk4412-5a02ab7c3c4580f94d13c683721039855b67cda6.zip
kernel_samsung_smdk4412-5a02ab7c3c4580f94d13c683721039855b67cda6.tar.gz
kernel_samsung_smdk4412-5a02ab7c3c4580f94d13c683721039855b67cda6.tar.bz2
nfsd: wrong index used in inner loop
We must not use dummy for index. After the first index, READ32(dummy) will change dummy!!!! Signed-off-by: Mi Jinlong <mijinlong@cn.fujitsu.com> [bfields@redhat.com: Trond points out READ_BUF alone is sufficient.] Cc: stable@kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4xdr.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 615f0a9..c6766af 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1142,7 +1142,7 @@ nfsd4_decode_create_session(struct nfsd4_compoundargs *argp,
u32 dummy;
char *machine_name;
- int i, j;
+ int i;
int nr_secflavs;
READ_BUF(16);
@@ -1215,8 +1215,6 @@ nfsd4_decode_create_session(struct nfsd4_compoundargs *argp,
READ_BUF(4);
READ32(dummy);
READ_BUF(dummy * 4);
- for (j = 0; j < dummy; ++j)
- READ32(dummy);
break;
case RPC_AUTH_GSS:
dprintk("RPC_AUTH_GSS callback secflavor "
@@ -1232,7 +1230,6 @@ nfsd4_decode_create_session(struct nfsd4_compoundargs *argp,
READ_BUF(4);
READ32(dummy);
READ_BUF(dummy);
- p += XDR_QUADLEN(dummy);
break;
default:
dprintk("Illegal callback secflavor\n");