From: Al Viro <viro@ZenIV.linux.org.uk>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [RFC] __d_path() API change (was Re: [PATCH] Remove use of mnt_ns->root and fix a couple of bugs in d_namespace_path)
Date: Tue, 6 Dec 2011 05:20:43 +0000 [thread overview]
Message-ID: <20111206052042.GE2203@ZenIV.linux.org.uk> (raw)
In-Reply-To: <201112060441.pB64fLwa005872@www262.sakura.ne.jp>
On Tue, Dec 06, 2011 at 01:41:21PM +0900, Tetsuo Handa wrote:
> > Cc: stable@vger.kernel.org
> Please add version you meant to apply.
Everything since mid 2010, I'm afraid - that's when apparmor went in and
it had that bug back then. IOW, 2.6.36 and everything later...
Tomoyo bits will need a backport for stuff older that 3.0 - there had
been changes around 3.0-rc2 or so.
> By the way, why do we need to call like
>
> write_seqlock(&rename_lock);
> error = prepend_path(path, root, &res, &buflen);
> write_sequnlock(&rename_lock);
>
> ? I think it would look something like
>
> do {
> seq = read_seqbegin(&rename_lock);
> error = prepend_path(path, root, &res, &buflen);
> } while (read_seqretry(&rename_lock, seq));
>
> because prepend_path() is for reading dentry tree rather than updating ...
I really don't like the idea. Look what's inside that function; it'll
grab/release ->d_lock on a bunch of dentries, in addition to grabbing
and releasing vfsmount_lock. We _might_ be able to get away with that
if we just use rcu_read_lock() instead of ->d_lock, but I would very much
like to see the data before doing that kind of change.
next prev parent reply other threads:[~2011-12-06 5:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1323034020-28780-1-git-send-email-john.johansen@canonical.com>
[not found] ` <20111204221020.GB2203@ZenIV.linux.org.uk>
2011-12-05 3:27 ` [RFC] __d_path() API change (was Re: [PATCH] Remove use of mnt_ns->root and fix a couple of bugs in d_namespace_path) Al Viro
2011-12-06 2:34 ` John Johansen
2011-12-06 3:58 ` Al Viro
2011-12-06 4:41 ` Tetsuo Handa
2011-12-06 5:20 ` Al Viro [this message]
2011-12-06 6:45 ` Tetsuo Handa
2011-12-06 15:49 ` Al Viro
2011-12-06 7:07 ` James Morris
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=20111206052042.GE2203@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
/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).