The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>,
	Xiaoming Ni <nixiaoming@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk,
	keescook@chromium.org, jlayton@kernel.org, bfields@fieldses.org,
	yzaikin@google.com, wangle6@huawei.com,
	Joe Perches <joe@perches.com>
Subject: Re: [PATCH] sysctl: Add a group of macro functions to initcall the sysctl table of each feature
Date: Mon, 13 Dec 2021 13:29:30 -0800	[thread overview]
Message-ID: <Ybe7Ot8b/N4yy3TM@bombadil.infradead.org> (raw)
In-Reply-To: <87mtl4ze1r.fsf@email.froward.int.ebiederm.org>

On Mon, Dec 13, 2021 at 10:04:48AM -0600, Eric W. Biederman wrote:
> If you look at __register_sysctl_table the core registration function
> you will see that all directory entries get reduced to simply a path
> component.  So they have nothing but their names as input into
> the sysctl subsystem.
> 
> Further __register_sysctl_table goes in a loop through the path
> and does get_subdir to find or create the directory.
> 
> Which means that if two places were to register sysctls in
> the "fs" directory they would both use the safe "fs" directory
> and whoever can first would create it.
> 
> Which should mean that worrying about ordering is completely
> unnecessary.
> 
> What am I missing?

I was being too cautious, sorry for not having dug enough.
Then this makes things much easier. Thanks!

  Luis

      reply	other threads:[~2021-12-13 21:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07  1:13 [PATCH] sysctl: Add a group of macro functions to initcall the sysctl table of each feature Xiaoming Ni
2021-12-07  1:38 ` Andrew Morton
2021-12-07  1:50   ` Joe Perches
2021-12-07  6:25     ` Xiaoming Ni
2021-12-07  6:30     ` Julia Lawall
2021-12-07  3:09   ` Xiaoming Ni
2021-12-07 20:18   ` Luis Chamberlain
2021-12-07 21:08     ` Eric W. Biederman
2021-12-07 22:39       ` Luis Chamberlain
2021-12-08  2:10         ` Xiaoming Ni
2021-12-08  2:44           ` Luis Chamberlain
2021-12-08 12:34             ` Xiaoming Ni
2021-12-08 20:05               ` Luis Chamberlain
2021-12-10  8:58                 ` [PATCH v2] " Xiaoming Ni
2021-12-10 17:20                   ` Luis Chamberlain
2021-12-12  9:58                     ` Xiaoming Ni
2021-12-13  3:31                   ` [PATCH v3] " Xiaoming Ni
2021-12-19 21:32                     ` Luis Chamberlain
2021-12-13 16:04         ` [PATCH] " Eric W. Biederman
2021-12-13 21:29           ` Luis Chamberlain [this message]

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=Ybe7Ot8b/N4yy3TM@bombadil.infradead.org \
    --to=mcgrof@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bfields@fieldses.org \
    --cc=ebiederm@xmission.com \
    --cc=jlayton@kernel.org \
    --cc=joe@perches.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nixiaoming@huawei.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=wangle6@huawei.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