linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Dmitry Vyukov <dvyukov@google.com>,
	Eric Dumazet <edumazet@google.com>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] fs/file.c: __fget() and dup2() atomicity rules
Date: Mon, 29 Jun 2015 18:46:16 +0100	[thread overview]
Message-ID: <20150629174616.GZ17109@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1435590630.4110.107.camel@edumazet-glaptop2.roam.corp.google.com>

On Mon, Jun 29, 2015 at 05:10:30PM +0200, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
> 
> __fget() makes sure a file refcount is not zero before
> taking a reference. It should also fetch again file pointer
> in order to respect dup2() atomicity requirements.
> 
> It should either read a NULL pointer or a file on which
> a refcount can be taken.

Hmm...   The problem is real, but I wonder if one could trigger a long
spin there...

  reply	other threads:[~2015-06-29 17:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-29 15:10 [PATCH] fs/file.c: __fget() and dup2() atomicity rules Eric Dumazet
2015-06-29 17:46 ` Al Viro [this message]
2015-06-30  5:02   ` Eric Dumazet

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=20150629174616.GZ17109@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=dvyukov@google.com \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).