diff options
author | David Howells <dhowells@redhat.com> | 2018-09-11 22:20:53 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2018-09-11 22:20:53 +0100 |
commit | 307c6e5241b4b44076c016bc64d1748b93d1792b (patch) | |
tree | 6b60bd39e494ea09efdc54e57c4cad7dc80760ce /security/tomoyo/tomoyo.c | |
parent | 11da3a7f84f19c26da6f86af878298694ede0804 (diff) | |
download | linux-next-307c6e5241b4b44076c016bc64d1748b93d1792b.tar.gz |
vfs: Require specification of size of mount data for internal mounts
Require specification of the size of the mount data passed to the VFS
mounting functions by internal mounts. The problem is that the legacy
handling for the upcoming mount-context patches has to copy an entire page
as that's how big the buffer is defined as being, but some of the internal
calls pass in a short bit of stack space, with the result that the stack
guard page may get hit.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'security/tomoyo/tomoyo.c')
-rw-r--r-- | security/tomoyo/tomoyo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/security/tomoyo/tomoyo.c b/security/tomoyo/tomoyo.c index 9f932e2d6852..07f1a0d3dd32 100644 --- a/security/tomoyo/tomoyo.c +++ b/security/tomoyo/tomoyo.c @@ -399,11 +399,13 @@ static int tomoyo_path_chroot(const struct path *path) * @type: Name of filesystem type. Maybe NULL. * @flags: Mount options. * @data: Optional data. Maybe NULL. + * @data_size: Size of data. * * Returns 0 on success, negative value otherwise. */ static int tomoyo_sb_mount(const char *dev_name, const struct path *path, - const char *type, unsigned long flags, void *data) + const char *type, unsigned long flags, + void *data, size_t data_size) { return tomoyo_mount_permission(dev_name, path, type, flags, data); } |