diff options
author | Jeff Layton <jlayton@redhat.com> | 2012-10-10 21:25:26 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-12 06:32:03 +0200 |
commit | a608ca21f58ee44df5a71ba140e98498f3ebc2cd (patch) | |
tree | 4ba6f5d5414ba9b579c8e41eb30c21a709537922 /samples/rpmsg | |
parent | audit: overhaul __audit_inode_child to accomodate retrying (diff) | |
download | linux-a608ca21f58ee44df5a71ba140e98498f3ebc2cd.tar.xz linux-a608ca21f58ee44df5a71ba140e98498f3ebc2cd.zip |
vfs: allocate page instead of names_cache buffer in mount_block_root
First, it's incorrect to call putname() after __getname_gfp() since the
bare __getname_gfp() call skips the auditing code, while putname()
doesn't.
mount_block_root allocates a PATH_MAX buffer via __getname_gfp, and then
calls get_fs_names to fill the buffer. That function can call
get_filesystem_list which assumes that that buffer is a full page in
size. On arches where PAGE_SIZE != 4k, then this could potentially
overrun.
In practice, it's hard to imagine the list of filesystem names even
approaching 4k, but it's best to be safe. Just allocate a page for this
purpose instead.
With this, we can also remove the __getname_gfp() definition since there
are no more callers.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'samples/rpmsg')
0 files changed, 0 insertions, 0 deletions