android_kernel_google_msm/include
Jeff Layton db18c8e1e5 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.

Change-Id: Ic4539226aa0562b82513be29ddcaee1ef88584f2
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2018-12-07 22:28:48 +04:00
..
acpi
asm-generic
crypto
drm
keys
linux vfs: allocate page instead of names_cache buffer in mount_block_root 2018-12-07 22:28:48 +04:00
math-emu
media msm: vidc: Add support for Picture Order Count Type 2018-08-27 14:52:37 +00:00
misc
mtd
net netfilter: add connlabel conntrack extension 2018-12-07 22:04:24 +04:00
pcmcia
rdma
rxrpc
scsi
sound ASoC: msm: flush if prior and current backends rate not matching 2018-08-27 14:52:45 +00:00
target
trace
video remove compilation error by changing int to uint32_t 2018-08-27 14:52:44 +00:00
xen
Kbuild