Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=14b8869ff4f00f105ea76678997b4d49d27baae3 Commit: 14b8869ff4f00f105ea76678997b4d49d27baae3 Parent: d199d652c513a010145a5a0d4e64c96361b97bee Author: Eric Van Hensbergen <[EMAIL PROTECTED]> AuthorDate: Wed Feb 6 19:25:05 2008 -0600 Committer: Eric Van Hensbergen <[EMAIL PROTECTED]> CommitDate: Wed Feb 6 19:25:05 2008 -0600
9p: fix mmap to be read-only v9fs was allowing writable mmap which could lead to kernel BUG() cases. This sets the mmap function to generic_file_readonly_mmap which (correctly) returns an error to applications which open mmap for writing. Signed-off-by: Eric Van Hensbergen <[EMAIL PROTECTED]> --- fs/9p/vfs_file.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index ba4b1ca..a616fff 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -184,7 +184,7 @@ static const struct file_operations v9fs_cached_file_operations = { .open = v9fs_file_open, .release = v9fs_dir_release, .lock = v9fs_file_lock, - .mmap = generic_file_mmap, + .mmap = generic_file_readonly_mmap, }; const struct file_operations v9fs_file_operations = { @@ -194,5 +194,5 @@ const struct file_operations v9fs_file_operations = { .open = v9fs_file_open, .release = v9fs_dir_release, .lock = v9fs_file_lock, - .mmap = generic_file_mmap, + .mmap = generic_file_readonly_mmap, }; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html