From: "Eric W. Biederman" <ebiederm@xmission.com>
To: Jan Kara <jack@suse.cz>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
kernel test robot <oliver.sang@intel.com>,
Luis Chamberlain <mcgrof@kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>,
Amir Goldstein <amir73il@gmail.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Antti Palosaari <crope@iki.fi>, Arnd Bergmann <arnd@arndb.de>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Benjamin LaHaise <bcrl@kvack.org>,
Clemens Ladisch <clemens@ladisch.de>,
David Airlie <airlied@linux.ie>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Iurii Zaikin <yzaikin@google.com>,
Jani Nikula <jani.nikula@linux.intel.com>,
Joel Becker <jlbec@evilplan.org>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Joseph Qi <joseph.qi@linux.alibaba.com>,
Julia Lawall <julia.lawall@inria.fr>,
Kees Cook <keescook@chromium.org>,
Lukas Middendorf <kernel@tuxforce.de>,
Mark Fasheh <mark@fasheh.com>, Paul Turner <pjt@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Petr Mladek <pmladek@suse.com>,
Phillip Potter <phil@philpotter.co.uk>,
Qing Wang <wangqing@vivo.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Sebastian Reichel <sre@kernel.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Stephen Kitt <steve@sk2.org>,
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
Xiaoming Ni <nixiaoming@huawei.com>,
Douglas Gilbert <dgilbert@interlog.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
Jani Nikula <jani.nikula@intel.com>,
John Ogness <john.ogness@linutronix.de>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Suren Baghdasaryan <surenb@google.com>,
Theodore Ts'o <tytso@mit.edu>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
lkp@lists.01.org, kernel test robot <lkp@intel.com>
Subject: Re: [ocfs2] c42ff46f97: sysctl_table_check_failed
Date: Fri, 28 Jan 2022 10:49:16 -0600 [thread overview]
Message-ID: <87a6ffst4j.fsf@email.froward.int.ebiederm.org> (raw)
In-Reply-To: <20220128120421.kzo5iduigr7k55bs@quack3.lan> (Jan Kara's message of "Fri, 28 Jan 2022 13:04:21 +0100")
Jan Kara <jack@suse.cz> writes:
> On Fri 28-01-22 10:00:29, Linus Torvalds wrote:
>> On Fri, Jan 28, 2022 at 8:53 AM kernel test robot <oliver.sang@intel.com> wrote:
>> >
>> > commit: 46e33fd45a52bf03769906e64d8a8a1ab317777d ("ocfs2: simplify subdirectory
>> > registration with register_sysctl()")
>>
>> Well, it's apparently commit c42ff46f97c1 ("ocfs2: simplify
>> subdirectory registration with register_sysctl()") in mainline now.
>>
>> What worries me a bit is that the commit was auto-generated, and when
>> reading the commit message it reads as if it wasn't supposed to cause
>> any semantic changes at all.
>>
>> Is the cause of this that 'nm' is supposed to be a directory, and
>> register_sysctl() doesn't handle directories?
>>
>> I don't know this code at all, should it have been simplified even
>> further with something (TOTALLY UNTESTED) like the attached?
>
> Yep, I've tested the patch and it fixes the failure for me. Feel free to
> add:
>
> Tested-by: Jan Kara <jack@suse.cz>
>
> Also the change makes sense to me as far as I'm reading register_sysctl()
> so you can also add:
>
> Reviewed-by: Jan Kara <jack@suse.cz>
Yes. There is a register_sysctl_paths that can be used if you want/need
the embedded directories. That probably would have been a better
choice for an automated conversion.
But since this there is only the single file in a single directory
register_sysctl() with the full path is perfectly fine in this case.
Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
>> diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c
>> index 731558a6f27d..dd77b7aaabf5 100644
>> --- a/fs/ocfs2/stackglue.c
>> +++ b/fs/ocfs2/stackglue.c
>> @@ -661,17 +661,6 @@ static struct ctl_table ocfs2_nm_table[] = {
>> { }
>> };
>>
>> -static struct ctl_table ocfs2_mod_table[] = {
>> - {
>> - .procname = "nm",
>> - .data = NULL,
>> - .maxlen = 0,
>> - .mode = 0555,
>> - .child = ocfs2_nm_table
>> - },
>> - { }
>> -};
>> -
>> static struct ctl_table_header *ocfs2_table_header;
>>
>> /*
>> @@ -682,7 +671,7 @@ static int __init ocfs2_stack_glue_init(void)
>> {
>> strcpy(cluster_stack_name, OCFS2_STACK_PLUGIN_O2CB);
>>
>> - ocfs2_table_header = register_sysctl("fs/ocfs2", ocfs2_mod_table);
>> + ocfs2_table_header = register_sysctl("fs/ocfs2/nm", ocfs2_nm_table);
>> if (!ocfs2_table_header) {
>> printk(KERN_ERR
>> "ocfs2 stack glue: unable to register sysctl\n");
next prev parent reply other threads:[~2022-01-28 16:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-28 6:53 kernel test robot
2022-01-28 8:00 ` Linus Torvalds
2022-01-28 12:04 ` Jan Kara
2022-01-28 16:49 ` Eric W. Biederman [this message]
2022-01-28 17:16 ` Linus Torvalds
2022-02-02 2:39 ` Luis Chamberlain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a6ffst4j.fsf@email.froward.int.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=airlied@linux.ie \
--cc=akpm@linux-foundation.org \
--cc=amir73il@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=bcrl@kvack.org \
--cc=benh@kernel.crashing.org \
--cc=clemens@ladisch.de \
--cc=crope@iki.fi \
--cc=dgilbert@interlog.com \
--cc=gregkh@linuxfoundation.org \
--cc=jack@suse.cz \
--cc=jani.nikula@intel.com \
--cc=jani.nikula@linux.intel.com \
--cc=jejb@linux.ibm.com \
--cc=jlbec@evilplan.org \
--cc=john.ogness@linutronix.de \
--cc=joonas.lahtinen@linux.intel.com \
--cc=joseph.qi@linux.alibaba.com \
--cc=julia.lawall@inria.fr \
--cc=keescook@chromium.org \
--cc=kernel@tuxforce.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=lkp@lists.01.org \
--cc=mark@fasheh.com \
--cc=martin.petersen@oracle.com \
--cc=mcgrof@kernel.org \
--cc=nixiaoming@huawei.com \
--cc=oliver.sang@intel.com \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=peterz@infradead.org \
--cc=phil@philpotter.co.uk \
--cc=pjt@google.com \
--cc=pmladek@suse.com \
--cc=rafael@kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=sre@kernel.org \
--cc=steve@sk2.org \
--cc=surenb@google.com \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
--cc=wangqing@vivo.com \
--cc=yzaikin@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome