summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/xdr.h
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2022-03-15 11:30:09 +0100
committerChuck Lever <chuck.lever@oracle.com>2022-03-15 14:35:56 +0100
commit184416d4b98509fb4c3d8fc3d6dc1437896cc159 (patch)
tree142754edc3ddc62e00f7f297df7ab6028853e94f /fs/nfsd/xdr.h
parentfs/lock: documentation cleanup. Replace inode->i_lock with flc_lock. (diff)
downloadlinux-184416d4b98509fb4c3d8fc3d6dc1437896cc159.tar.xz
linux-184416d4b98509fb4c3d8fc3d6dc1437896cc159.zip
NFSD: prevent underflow in nfssvc_decode_writeargs()
Smatch complains: fs/nfsd/nfsxdr.c:341 nfssvc_decode_writeargs() warn: no lower bound on 'args->len' Change the type to unsigned to prevent this issue. Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/xdr.h')
-rw-r--r--fs/nfsd/xdr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/xdr.h b/fs/nfsd/xdr.h
index 528fb299430e..852f71580bd0 100644
--- a/fs/nfsd/xdr.h
+++ b/fs/nfsd/xdr.h
@@ -32,7 +32,7 @@ struct nfsd_readargs {
struct nfsd_writeargs {
svc_fh fh;
__u32 offset;
- int len;
+ __u32 len;
struct xdr_buf payload;
};