From: Al Viro <viro@ZenIV.linux.org.uk>
To: David Herrmann <dh.herrmann@gmail.com>
Cc: linux-fsdevel@vger.kernel.org, torvalds@linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs: load FS modules before pinning the mountpoint
Date: Thu, 13 Nov 2014 14:43:03 +0000 [thread overview]
Message-ID: <20141113144303.GJ7996@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1415888073-1827-1-git-send-email-dh.herrmann@gmail.com>
On Thu, Nov 13, 2014 at 03:14:33PM +0100, David Herrmann wrote:
> Several pseudo file-systems create default mountpoints in /sys/fs/ or
> /sys/kernel/, including:
> /sys/kernel/debug
> /sys/fs/mqueue
> /sys/fs/cgroup
> /sys/fs/pstore
>
> If the given pseudo file-system is available as a module, user-space can
> rely on mount(2) to load the module on-demand (assuming MODULE_ALIAS_FS).
> However, in case the default mount-point is created by the file-system
> itself, mount(2) will fail as it cannot pin the mountpoint.
>
> This patch makes mount(2) load any requested file-systems before pinning
> the target mount-point. This way, a file-system module can create default
> mount-points in the module instead of creating them statically in the
> core kernel.
I'm not taking that until I see a module that would attempt to do such
mountpoint creation *and* managed to get it race-free.
Besides, I really don't like the way you do this lookup only to never use
the result other than for pinning the damn module. But that's secondary -
the main issue is with the amount of fun races in the whole "let module
create that default mountpoint" approach.
prev parent reply other threads:[~2014-11-13 14:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-13 14:14 [PATCH] fs: load FS modules before pinning the mountpoint David Herrmann
2014-11-13 14:43 ` Al Viro [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=20141113144303.GJ7996@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=dh.herrmann@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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