From: Oleg Nesterov <oleg@redhat.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
"security@kernel.org" <security@kernel.org>,
Ingo Molnar <mingo@kernel.org>, Willy Tarreau <w@1wt.eu>,
linux-kernel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>,
Linux FS Devel <linux-fsdevel@vger.kernel.org>,
spender@grsecurity.net
Subject: Re: [PATCH] vfs: Tighten up linkat(..., AT_EMPTY_PATH)
Date: Wed, 21 Aug 2013 20:20:53 +0200 [thread overview]
Message-ID: <20130821182053.GA19624@redhat.com> (raw)
In-Reply-To: <0be9da18c0ca360773a397de3063d01019ff88d8.1377107508.git.luto@amacapital.net>
Can't really comment the patch, just a nit:
On 08/21, Andy Lutomirski wrote:
>
> +static bool may_flink(const struct path *path)
> +{
> + bool ret;
> + struct inode *inode = path->dentry->d_inode;
> +
> + /*
> + * This is racy: I_LINKABLE could be cleared between this check
> + * and the actual link operation.
OK,
> + spin_lock(&inode->i_lock);
> + ret = !!(inode->i_state & I_LINKABLE);
> + spin_unlock(&inode->i_lock);
so why do we need to take a lock ?
Oleg.
next prev parent reply other threads:[~2013-08-21 18:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CALCETrXMQdjRyvP8RHOd5xjciurS7-hKUOExvkvQ1RWmdRdypA@mail.gmail.com>
2013-08-21 18:05 ` [PATCH] vfs: Tighten up linkat(..., AT_EMPTY_PATH) Andy Lutomirski
2013-08-21 18:20 ` Oleg Nesterov [this message]
2013-08-21 18:43 ` Andy Lutomirski
2013-08-21 18:47 ` Oleg Nesterov
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=20130821182053.GA19624@redhat.com \
--to=oleg@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=security@kernel.org \
--cc=spender@grsecurity.net \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
--cc=w@1wt.eu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.