NFS: Prevent integer overflow in nfs_scan_list()
Also ensure that nfs_inode ncommit and npages are large enough to represent all possible values for the number of pages. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
@@ -425,6 +425,8 @@ int nfs_scan_list(struct nfs_inode *nfsi,
|
||||
req->wb_index, tag);
|
||||
nfs_list_add_request(req, dst);
|
||||
res++;
|
||||
if (res == INT_MAX)
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user