mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
fs/file_table: fix adding missing kmemleak_not_leak()
Commitb42bc9a3c5("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(). Fixes:b42bc9a3c5("Fix regression due to "fs: move binfmt_misc sysctl to its own file") Reported-by: Tong Zhang <ztong0001@gmail.com> Cc: Tong Zhang <ztong0001@gmail.com> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
2dd3a8a139
commit
a3580ac9b7
|
|
@ -27,6 +27,7 @@
|
||||||
#include <linux/task_work.h>
|
#include <linux/task_work.h>
|
||||||
#include <linux/ima.h>
|
#include <linux/ima.h>
|
||||||
#include <linux/swap.h>
|
#include <linux/swap.h>
|
||||||
|
#include <linux/kmemleak.h>
|
||||||
|
|
||||||
#include <linux/atomic.h>
|
#include <linux/atomic.h>
|
||||||
|
|
||||||
|
|
@ -119,8 +120,11 @@ static struct ctl_table fs_stat_sysctls[] = {
|
||||||
static int __init init_fs_stat_sysctls(void)
|
static int __init init_fs_stat_sysctls(void)
|
||||||
{
|
{
|
||||||
register_sysctl_init("fs", fs_stat_sysctls);
|
register_sysctl_init("fs", fs_stat_sysctls);
|
||||||
if (IS_ENABLED(CONFIG_BINFMT_MISC))
|
if (IS_ENABLED(CONFIG_BINFMT_MISC)) {
|
||||||
register_sysctl_mount_point("fs/binfmt_misc");
|
struct ctl_table_header *hdr;
|
||||||
|
hdr = register_sysctl_mount_point("fs/binfmt_misc");
|
||||||
|
kmemleak_not_leak(hdr);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
fs_initcall(init_fs_stat_sysctls);
|
fs_initcall(init_fs_stat_sysctls);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user