mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: kernel test robot <oliver.sang@intel.com>,
	Luis Chamberlain <mcgrof@kernel.org>, Jan Kara <jack@suse.cz>,
	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>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	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 13:04:21 +0100	[thread overview]
Message-ID: <20220128120421.kzo5iduigr7k55bs@quack3.lan> (raw)
In-Reply-To: <CAHk-=wgT6wuBB=pK2bGNQbioNCdJHT8Jnvs+4oT25jX1JFyhgg@mail.gmail.com>

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>



								Honza

> 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");

-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2022-01-28 12:04 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 [this message]
2022-01-28 16:49     ` Eric W. Biederman
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=20220128120421.kzo5iduigr7k55bs@quack3.lan \
    --to=jack@suse.cz \
    --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=ebiederm@xmission.com \
    --cc=gregkh@linuxfoundation.org \
    --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

all inboxes | Powered by JetHome®