netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: Eric Dumazet <dada1@cosmosbay.com>,
	David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: [take 2] Fix for the fundamental network/block layer race in sendfile().
Date: Wed, 9 Apr 2008 13:33:21 +0200	[thread overview]
Message-ID: <20080409113321.GK12774@kernel.dk> (raw)
In-Reply-To: <20080408213054.GA8791@2ka.mipt.ru>

On Wed, Apr 09 2008, Evgeniy Polyakov wrote:
> On Tue, Apr 08, 2008 at 09:26:52PM +0400, Evgeniy Polyakov (johnpol@2ka.mipt.ru) wrote:
> > >    Unless I mistaken, you store in page->lru.next some info to find 
> > > your pipe pointer, assuming it is unique for this page.
> > > 
> > > What happens if two threads are doing a splice()/sendfile() using the 
> > > same underlying (source) file (and same pages in this file)
> > 
> > Page will be referenced twice (for each thread) and each thread will
> > have own pipe_inode_info structure, so each one will sleep on own wait
> > queue and will be awakened separately, where its release counter will be
> > dropped.
> 
> I was wrong, here will be a problem - page can be shared between multiple
> threads, since it is unlocked after putting it into page cache, so it is
> not allowed to put into it some per-thread private data.

Threads or not, it does not matter. Even simpler, the same page could be
in multiple pipes. So that trick definitely will not work at all.

-- 
Jens Axboe


  reply	other threads:[~2008-04-09 11:33 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-28  9:20 Network/block layer race Evgeniy Polyakov
2008-03-28 20:40 ` David Miller
2008-03-28 20:56   ` Evgeniy Polyakov
2008-03-28 21:07     ` David Miller
2008-03-28 21:51       ` Evgeniy Polyakov
2008-04-01 16:49         ` Fix for the fundamental network/block layer race in sendfile() Evgeniy Polyakov
2008-04-01 17:14           ` Mika Penttilä
2008-04-01 17:36             ` Evgeniy Polyakov
2008-04-01 17:19           ` Eric Dumazet
2008-04-01 17:47             ` Evgeniy Polyakov
2008-04-01 18:07               ` Evgeniy Polyakov
2008-04-01 19:21                 ` Eric Dumazet
2008-04-01 19:45                   ` Evgeniy Polyakov
2008-04-01 20:59                     ` Eric Dumazet
2008-04-01 21:14                       ` Evgeniy Polyakov
2008-04-08 12:25           ` [take 2] " Evgeniy Polyakov
2008-04-08 12:58             ` Eric Dumazet
2008-04-08 17:26               ` Evgeniy Polyakov
2008-04-08 21:30                 ` Evgeniy Polyakov
2008-04-09 11:33                   ` Jens Axboe [this message]
2011-06-06 16:29             ` IPv6 DNSSL (rfc6106): please include the patch to pass it to user space Carlos Carvalho
2011-06-06 19:40               ` David Miller

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=20080409113321.GK12774@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=dada1@cosmosbay.com \
    --cc=davem@davemloft.net \
    --cc=johnpol@2ka.mipt.ru \
    --cc=netdev@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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).