[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080401194527.GA26833@2ka.mipt.ru>
Date: Tue, 1 Apr 2008 23:45:27 +0400
From: Evgeniy Polyakov <johnpol@....mipt.ru>
To: Eric Dumazet <dada1@...mosbay.com>
Cc: David Miller <davem@...emloft.net>, axboe@...nel.dk,
netdev@...r.kernel.org
Subject: Re: Fix for the fundamental network/block layer race in sendfile().
On Tue, Apr 01, 2008 at 09:21:19PM +0200, Eric Dumazet (dada1@...mosbay.com) wrote:
> I see no socket locking, so multiple threads could use sendfile() &
> sendmsg() on same socket, and crash kernel...
How?
Those who use sendfile() automatically install page->lru.prev which is
checked in release path, only those with given value will be processed
as spliced (i.e. new callback).
It is safe to install new callback on skbs which were not spliced, since
for that skbs it will be pure sock_wfree().
--
Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists