diff mbox

nfsd: wrong index used in inner loop

Message ID 4D79A183.8090306@cn.fujitsu.com (mailing list archive)
State RFC, archived
Headers show

Commit Message

Mi Jinlong March 11, 2011, 4:13 a.m. UTC
None
diff mbox

Patch

============================================================

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>
---
 fs/nfsd/nfs4xdr.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 615f0a9..8dd70d0 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1140,7 +1140,7 @@  nfsd4_decode_create_session(struct nfsd4_compoundargs *argp,
 {
 	DECODE_HEAD;
 
-	u32 dummy;
+	u32 dummy, tmp;
 	char *machine_name;
 	int i, j;
 	int nr_secflavs;
@@ -1216,7 +1216,7 @@  nfsd4_decode_create_session(struct nfsd4_compoundargs *argp,
 			READ32(dummy);
 			READ_BUF(dummy * 4);
 			for (j = 0; j < dummy; ++j)
-				READ32(dummy);
+				READ32(tmp);
 			break;
 		case RPC_AUTH_GSS:
 			dprintk("RPC_AUTH_GSS callback secflavor "