The patch titled Subject: fs/file_table: fix adding missing kmemleak_not_leak() has been added to the -mm tree. Its filename is fs-file_table-fix-adding-missing-kmemleak_not_leak.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/fs-file_table-fix-adding-missing-kmemleak_not_leak.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/fs-file_table-fix-adding-missing-kmemleak_not_leak.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Luis Chamberlain <mcgrof@xxxxxxxxxx> Subject: fs/file_table: fix adding missing kmemleak_not_leak() Commit b42bc9a3c511 ("Fix regression due to "fs: move binfmt_misc sysctl to its own file") fixed a regression, however it failed to add a kmemleak_not_leak(). Link: https://lkml.kernel.org/r/20220215020828.4180911-1-mcgrof@xxxxxxxxxx Fixes: b42bc9a3c511 ("Fix regression due to "fs: move binfmt_misc sysctl to its own file") Signed-off-by: Luis Chamberlain <mcgrof@xxxxxxxxxx> Reported-by: Tong Zhang <ztong0001@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/file_table.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/fs/file_table.c~fs-file_table-fix-adding-missing-kmemleak_not_leak +++ a/fs/file_table.c @@ -27,6 +27,7 @@ #include <linux/task_work.h> #include <linux/ima.h> #include <linux/swap.h> +#include <linux/kmemleak.h> #include <linux/atomic.h> @@ -119,8 +120,11 @@ static struct ctl_table fs_stat_sysctls[ static int __init init_fs_stat_sysctls(void) { register_sysctl_init("fs", fs_stat_sysctls); - if (IS_ENABLED(CONFIG_BINFMT_MISC)) - register_sysctl_mount_point("fs/binfmt_misc"); + if (IS_ENABLED(CONFIG_BINFMT_MISC)) { + struct ctl_table_header *hdr; + hdr = register_sysctl_mount_point("fs/binfmt_misc"); + kmemleak_not_leak(hdr); + } return 0; } fs_initcall(init_fs_stat_sysctls); _ Patches currently in -mm which might be from mcgrof@xxxxxxxxxx are fs-file_table-fix-adding-missing-kmemleak_not_leak.patch