Commit a628f667 authored by Chuck Lever's avatar Chuck Lever Committed by J. Bruce Fields

NFSD: Fix mixed sign comparison in nfs3svc_decode_symlinkargs

Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Acked-By: default avatarNeilBrown <neilb@suse.de>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent 9c7544d3
...@@ -452,8 +452,7 @@ int ...@@ -452,8 +452,7 @@ int
nfs3svc_decode_symlinkargs(struct svc_rqst *rqstp, __be32 *p, nfs3svc_decode_symlinkargs(struct svc_rqst *rqstp, __be32 *p,
struct nfsd3_symlinkargs *args) struct nfsd3_symlinkargs *args)
{ {
unsigned int len; unsigned int len, avail;
int avail;
char *old, *new; char *old, *new;
struct kvec *vec; struct kvec *vec;
...@@ -486,7 +485,8 @@ nfs3svc_decode_symlinkargs(struct svc_rqst *rqstp, __be32 *p, ...@@ -486,7 +485,8 @@ nfs3svc_decode_symlinkargs(struct svc_rqst *rqstp, __be32 *p,
/* now copy next page if there is one */ /* now copy next page if there is one */
if (len && !avail && rqstp->rq_arg.page_len) { if (len && !avail && rqstp->rq_arg.page_len) {
avail = rqstp->rq_arg.page_len; avail = rqstp->rq_arg.page_len;
if (avail > PAGE_SIZE) avail = PAGE_SIZE; if (avail > PAGE_SIZE)
avail = PAGE_SIZE;
old = page_address(rqstp->rq_arg.pages[0]); old = page_address(rqstp->rq_arg.pages[0]);
} }
while (len && avail && *old) { while (len && avail && *old) {
......
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