NFS: Fix filehandle size comparisons in the mount code
Fix a sign issue in xdr_decode_fhstatus3() Fix incorrect comparison in nfs_validate_mount_data() Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
@ -130,10 +130,11 @@ static int xdr_decode_fhstatus3(struct rpc_rqst *req, __be32 *p,
|
||||
struct mnt_fhstatus *res)
|
||||
{
|
||||
struct nfs_fh *fh = res->fh;
|
||||
unsigned size;
|
||||
|
||||
if ((res->status = ntohl(*p++)) == 0) {
|
||||
int size = ntohl(*p++);
|
||||
if (size <= NFS3_FHSIZE) {
|
||||
size = ntohl(*p++);
|
||||
if (size <= NFS3_FHSIZE && size != 0) {
|
||||
fh->size = size;
|
||||
memcpy(fh->data, p, size);
|
||||
} else
|
||||
|
Reference in New Issue
Block a user