diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2007-11-01 16:56:53 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2008-02-01 16:42:02 -0500 |
commit | 48df020aa17ac95a012ff765b0086ede5996b320 (patch) | |
tree | 52aa9d1ff1e320ead499bddfe98cb05b06df1311 /include/linux/lockd/xdr.h | |
parent | e5cff482c78a35b9f149a06aa777a1bd693864fb (diff) |
NLM: Fix sign of length of NLM variable length strings
According to The Open Group's NLM specification, NLM callers are variable
length strings. XDR variable length strings use an unsigned 32 bit length.
And internally, negative string lengths are not meaningful for the Linux
NLM implementation.
Clean up: Make nlm_lock.len and nlm_reboot.len unsigned integers. This
makes the sign of NLM string lengths consistent with the sign of xdr_netobj
lengths.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Acked-By: NeilBrown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'include/linux/lockd/xdr.h')
-rw-r--r-- | include/linux/lockd/xdr.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/lockd/xdr.h b/include/linux/lockd/xdr.h index 83a1f9f6237b..df18fa053bcd 100644 --- a/include/linux/lockd/xdr.h +++ b/include/linux/lockd/xdr.h | |||
@@ -29,7 +29,7 @@ struct svc_rqst; | |||
29 | /* Lock info passed via NLM */ | 29 | /* Lock info passed via NLM */ |
30 | struct nlm_lock { | 30 | struct nlm_lock { |
31 | char * caller; | 31 | char * caller; |
32 | int len; /* length of "caller" */ | 32 | unsigned int len; /* length of "caller" */ |
33 | struct nfs_fh fh; | 33 | struct nfs_fh fh; |
34 | struct xdr_netobj oh; | 34 | struct xdr_netobj oh; |
35 | u32 svid; | 35 | u32 svid; |
@@ -78,7 +78,7 @@ struct nlm_res { | |||
78 | */ | 78 | */ |
79 | struct nlm_reboot { | 79 | struct nlm_reboot { |
80 | char * mon; | 80 | char * mon; |
81 | int len; | 81 | unsigned int len; |
82 | u32 state; | 82 | u32 state; |
83 | __be32 addr; | 83 | __be32 addr; |
84 | __be32 vers; | 84 | __be32 vers; |