From: Al Viro <viro@ZenIV.linux.org.uk>
To: Stef Bon <stefbon@gmail.com>
Cc: Stef Bon <stef@bononline.nl>,
linux-fsdevel@vger.kernel.org, rlove@rlove.org,
eparis@parisplace.org
Subject: Re: [PATCH] VFS/inotify: send netlink messages when an inotify watch has been set or removed.
Date: Sat, 7 Jan 2012 19:05:36 +0000 [thread overview]
Message-ID: <20120107190536.GP23916@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CANXojcyGRN9bQb5Asx3tLPp4wJ68QdrStTW6iCbTKiV_OOHazw@mail.gmail.com>
On Sat, Jan 07, 2012 at 05:59:10PM +0100, Stef Bon wrote:
> Yes you've got a point here. Absolutly, the moving of a subtree is not
> noticed by the fuse fs, and therefore cannot be taken into account.
> And yes, I agree, that the only way to deal with that is "if you do
> this with the fuse fs, strange things can happen type of warning". I'm
> happy we agree on something!
There are almost certainly some things we agree on, but that's not
the *only* way to deal with that. "Don't use inotify" is another.
And it's not just moving a subtree. mount --bind followed by umount
of the original is another obvious example. So's having per-user
namespaces, etc.
Moreover, exact same example of a race would still apply without
mount being involved - have user pass /proc/6969/fd/42/bar/barf to
inotify_add_watch() and replace mount --move with dup2().
Passing the pathname is *hopeless* here. And IMNSHO so's relying on
inotify in general - it's not a general-purpose API and any program
relying on it being usable on an arbitrary part of tree is buggy.
next prev parent reply other threads:[~2012-01-07 19:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-07 13:36 [PATCH] VFS/inotify: send netlink messages when an inotify watch has been set or removed Stef Bon
2012-01-07 14:38 ` Al Viro
2012-01-07 15:03 ` Stef Bon
2012-01-07 15:42 ` Al Viro
2012-01-07 15:57 ` Al Viro
2012-01-07 16:59 ` Stef Bon
2012-01-07 19:05 ` Al Viro [this message]
2012-01-07 21:13 ` Stef Bon
-- strict thread matches above, loose matches on Subject: below --
2012-01-05 20:56 Stef Bon
2012-01-06 14:13 ` Stef Bon
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=20120107190536.GP23916@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=eparis@parisplace.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=rlove@rlove.org \
--cc=stef@bononline.nl \
--cc=stefbon@gmail.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;
as well as URLs for NNTP newsgroup(s).