[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YgklDvNecca1/8in@shredder>
Date: Sun, 13 Feb 2022 17:34:38 +0200
From: Ido Schimmel <idosch@...sch.org>
To: Domenico Andreoli <domenico.andreoli@...ux.com>
Cc: Luis Chamberlain <mcgrof@...nel.org>,
Tong Zhang <ztong0001@...il.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
David Airlie <airlied@...ux.ie>,
Andrew Morton <akpm@...ux-foundation.org>, amir73il@...il.com,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Arnd Bergmann <arnd@...db.de>, bcrl@...ck.org,
benh@...nel.crashing.org, clemens@...isch.de, crope@....fi,
dgilbert@...erlog.com, Greg KH <gregkh@...uxfoundation.org>,
jack@...e.cz, jani.nikula@...el.com, jani.nikula@...ux.intel.com,
"James E.J. Bottomley" <jejb@...ux.ibm.com>, jlbec@...lplan.org,
john.ogness@...utronix.de, joonas.lahtinen@...ux.intel.com,
Joseph Qi <joseph.qi@...ux.alibaba.com>, julia.lawall@...ia.fr,
Kees Cook <keescook@...omium.org>, kernel@...force.de,
Linux Memory Management List <linux-mm@...ck.org>,
mark@...heh.com, "Martin K. Petersen" <martin.petersen@...cle.com>,
mm-commits@...r.kernel.org, nixiaoming@...wei.com,
penguin-kernel@...ove.sakura.ne.jp, peterz@...radead.org,
phil@...lpotter.co.uk, pjt@...gle.com, pmladek@...e.com,
rafael@...nel.org, rodrigo.vivi@...el.com, rostedt@...dmis.org,
senozhatsky@...omium.org, sre@...nel.org, steve@....org,
surenb@...gle.com, torvalds@...ux-foundation.org, tytso@....edu,
Al Viro <viro@...iv.linux.org.uk>, wangqing@...o.com,
Iurii Zaikin <yzaikin@...gle.com>,
open list <linux-kernel@...r.kernel.org>,
regressions@...ts.linux.dev
Subject: Re: [PATCH v2] Fix regression due to "fs: move binfmt_misc sysctl to
its own file"
On Wed, Feb 09, 2022 at 08:49:20AM +0100, Domenico Andreoli wrote:
> fs/binfmt_misc.c | 6 +-----
> fs/file_table.c | 2 ++
> 2 files changed, 3 insertions(+), 5 deletions(-)
>
> Index: b/fs/binfmt_misc.c
> ===================================================================
> --- a/fs/binfmt_misc.c
> +++ b/fs/binfmt_misc.c
> @@ -817,20 +817,16 @@ static struct file_system_type bm_fs_typ
> };
> MODULE_ALIAS_FS("binfmt_misc");
>
> -static struct ctl_table_header *binfmt_misc_header;
> -
> static int __init init_misc_binfmt(void)
> {
> int err = register_filesystem(&bm_fs_type);
> if (!err)
> insert_binfmt(&misc_format);
> - binfmt_misc_header = register_sysctl_mount_point("fs/binfmt_misc");
> - return 0;
> + return err;
> }
>
> static void __exit exit_misc_binfmt(void)
> {
> - unregister_sysctl_table(binfmt_misc_header);
> unregister_binfmt(&misc_format);
> unregister_filesystem(&bm_fs_type);
> }
> Index: b/fs/file_table.c
> ===================================================================
> --- a/fs/file_table.c
> +++ b/fs/file_table.c
> @@ -119,6 +119,8 @@ 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");
Hi,
kmemleak complains about this:
# cat /sys/kernel/debug/kmemleak
unreferenced object 0xffff8881045fea88 (size 96):
comm "swapper/0", pid 1, jiffies 4294669355 (age 167.804s)
hex dump (first 32 bytes):
e0 c8 07 88 ff ff ff ff 00 00 00 00 01 00 00 00 ................
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff81d11637>] __register_sysctl_table+0x117/0x1150
[<ffffffff86c3600f>] init_fs_stat_sysctls+0x30/0x33
[<ffffffff81002558>] do_one_initcall+0x108/0x690
[<ffffffff86bca8bd>] kernel_init_freeable+0x45a/0x4de
[<ffffffff83e0757f>] kernel_init+0x1f/0x220
[<ffffffff810048cf>] ret_from_fork+0x1f/0x30
> return 0;
> }
> fs_initcall(init_fs_stat_sysctls);
>
Powered by blists - more mailing lists