diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2017-01-05 17:19:26 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2017-01-05 17:19:26 +0000 |
commit | 2f304845e24500e279d9240911b92d3a87f5191b (patch) | |
tree | ccdf46a62417c8e64f21542de48579bf05a69030 /sys/kern/vfs_mount.c | |
parent | 2677b6e77f34f8032b71bf5005bd3780f6e17e6a (diff) | |
download | src-2f304845e24500e279d9240911b92d3a87f5191b.tar.gz src-2f304845e24500e279d9240911b92d3a87f5191b.zip |
Do not allocate struct statfs on kernel stack.
Right now size of the structure is 472 bytes on amd64, which is
already large and stack allocations are indesirable. With the ino64
work, MNAMELEN is increased to 1024, which will make it impossible to have
struct statfs on the stack.
Extracted from: ino64 work by gleb
Discussed with: mckusick
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=311452
Diffstat (limited to 'sys/kern/vfs_mount.c')
-rw-r--r-- | sys/kern/vfs_mount.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 99bfb101f135..34bf1aaf456c 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -79,6 +79,7 @@ SYSCTL_INT(_vfs, OID_AUTO, usermount, CTLFLAG_RW, &usermount, 0, "Unprivileged users may mount and unmount file systems"); MALLOC_DEFINE(M_MOUNT, "mount", "vfs mount structure"); +MALLOC_DEFINE(M_STATFS, "statfs", "statfs structure"); static uma_zone_t mount_zone; /* List of mounted filesystems. */ |