提交 dce34ce2 编写于 作者: T Trond Myklebust

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: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 2aefa104
......@@ -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;
}
}
......
......@@ -158,7 +158,7 @@ struct nfs_inode {
spinlock_t req_lock;
struct radix_tree_root nfs_page_tree;
unsigned int ncommit,
unsigned long ncommit,
npages;
/* Open contexts for shared mmap writes */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册