summaryrefslogtreecommitdiff
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorMike Kravetz <mike.kravetz@oracle.com>2019-11-30 17:56:34 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-04 19:18:31 +0100
commit865e3fd60eaa6bc3f5271708b520bd55e98f1a48 (patch)
treea07b80d46013630c43b20a3149fc9a6406fbdb29 /kernel/sysctl.c
parent623309a6e6c840e0e84b36ac40058c0e7be2307b (diff)
mm/hugetlbfs: fix error handling when setting up mounts
[ Upstream commit 8fc312b32b25c6b0a8b46fab4df8c68df5af1223 ] It is assumed that the hugetlbfs_vfsmount[] array will contain either a valid vfsmount pointer or NULL for each hstate after initialization. Changes made while converting to use fs_context broke this assumption. While fixing the hugetlbfs_vfsmount issue, it was discovered that init_hugetlbfs_fs never did correctly clean up when encountering a vfs mount error. It was found during code inspection. A small memory allocation failure would be the most likely cause of taking a error path with the bug. This is unlikely to happen as this is early init code. Link: http://lkml.kernel.org/r/94b6244d-2c24-e269-b12c-e3ba694b242d@oracle.com Reported-by: Chengguang Xu <cgxu519@mykernel.net> Fixes: 32021982a324 ("hugetlbfs: Convert to fs_context") Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com> Cc: David Howells <dhowells@redhat.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel/sysctl.c')
0 files changed, 0 insertions, 0 deletions