From: Trond Myklebust Date: Fri, 8 Sep 2006 16:48:54 +0000 (-0700) Subject: [PATCH] NFS: large non-page-aligned direct I/O clobbers memory X-Git-Tag: v2.6.18-rc7~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9f7bee1df223dcf83743b46cb06c08d95497ec0;p=pandora-kernel.git [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 Cc: Chuck Lever Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed