-
- Downloads
[PATCH] NFS: large non-page-aligned direct I/O clobbers memory
The logic in nfs_direct_read_schedule and nfs_direct_write_schedule can allow data->npages to be one larger than rpages. This causes a page pointer to be written beyond the end of the pagevec in nfs_read_data (or nfs_write_data). Fix this by making nfs_(read|write)_alloc() calculate the size of the pagevec array, and initialise data->npages. Also get rid of the redundant argument to nfs_commit_alloc(). Signed-off-by:Trond Myklebust <Trond.Myklebust@netapp.com> Cc: Chuck Lever <chuck.lever@oracle.com> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
Showing
- fs/nfs/direct.c 14 additions, 36 deletionsfs/nfs/direct.c
- fs/nfs/read.c 13 additions, 11 deletionsfs/nfs/read.c
- fs/nfs/write.c 15 additions, 22 deletionsfs/nfs/write.c
- include/linux/nfs_fs.h 3 additions, 3 deletionsinclude/linux/nfs_fs.h
- include/linux/nfs_xdr.h 2 additions, 2 deletionsinclude/linux/nfs_xdr.h
Loading
Please register or sign in to comment