[Top] [All Lists]

Re: Hole punching and mmap races

To: Jan Kara <jack@xxxxxxx>
Subject: Re: Hole punching and mmap races
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 18 May 2012 20:12:10 +1000
Cc: linux-fsdevel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx, Hugh Dickins <hughd@xxxxxxxxxx>, linux-mm@xxxxxxxxx
In-reply-to: <20120517232829.GA31028@xxxxxxxxxxxxx>
References: <20120515224805.GA25577@xxxxxxxxxxxxx> <20120516021423.GO25351@dastard> <20120516130445.GA27661@xxxxxxxxxxxxx> <20120517074308.GQ25351@dastard> <20120517232829.GA31028@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Fri, May 18, 2012 at 01:28:29AM +0200, Jan Kara wrote:
> On Thu 17-05-12 17:43:08, Dave Chinner wrote:
> > On Wed, May 16, 2012 at 03:04:45PM +0200, Jan Kara wrote:
> > > On Wed 16-05-12 12:14:23, Dave Chinner wrote:
> > IIRC, it's a rare case (that I consider insane, BTW):  read from a
> > file with into a buffer that is a mmap()d region of the same file
> > that has not been faulted in yet.....
>   With punch hole, the race is less insane - just punching hole in the area
> which is accessed via mmap could race in a bad way AFAICS.

Seems the simple answer to me is to prevent page faults while hole
punching, then....


Dave Chinner

<Prev in Thread] Current Thread [Next in Thread>