Re: [PATCH 3/8] mm, hugetlb: fix race in region tracking

2014-02-03 Thread Andrew Morton
On Tue, 28 Jan 2014 17:19:38 -0800 Davidlohr Bueso wrote: > On Tue, 2014-01-28 at 19:36 -0500, Naoya Horiguchi wrote: > > On Mon, Jan 27, 2014 at 06:34:17PM -0800, Davidlohr Bueso wrote: > [...] > > > > If this retry is really essential for the fix, please comment the reason > > > > both in patch

Re: [PATCH 3/8] mm, hugetlb: fix race in region tracking

2014-01-28 Thread Davidlohr Bueso
On Tue, 2014-01-28 at 19:36 -0500, Naoya Horiguchi wrote: > On Mon, Jan 27, 2014 at 06:34:17PM -0800, Davidlohr Bueso wrote: [...] > > > If this retry is really essential for the fix, please comment the reason > > > both in patch description and inline comment. It's very important for > > > future

Re: [PATCH 3/8] mm, hugetlb: fix race in region tracking

2014-01-28 Thread Naoya Horiguchi
On Mon, Jan 27, 2014 at 06:34:17PM -0800, Davidlohr Bueso wrote: > On Mon, 2014-01-27 at 20:53 -0500, Naoya Horiguchi wrote: > > Hi Davidlohr, > > > > On Mon, Jan 27, 2014 at 01:44:02PM -0800, Davidlohr Bueso wrote: > > > On Mon, 2014-01-27 at 16:02 -0500, Naoya Horiguchi wrote: > > > > On Sun, Ja

Re: [PATCH 3/8] mm, hugetlb: fix race in region tracking

2014-01-27 Thread Davidlohr Bueso
On Mon, 2014-01-27 at 20:53 -0500, Naoya Horiguchi wrote: > Hi Davidlohr, > > On Mon, Jan 27, 2014 at 01:44:02PM -0800, Davidlohr Bueso wrote: > > On Mon, 2014-01-27 at 16:02 -0500, Naoya Horiguchi wrote: > > > On Sun, Jan 26, 2014 at 07:52:21PM -0800, Davidlohr Bueso wrote: > > > > From: Joonsoo

Re: [PATCH 3/8] mm, hugetlb: fix race in region tracking

2014-01-27 Thread Naoya Horiguchi
Hi Davidlohr, On Mon, Jan 27, 2014 at 01:44:02PM -0800, Davidlohr Bueso wrote: > On Mon, 2014-01-27 at 16:02 -0500, Naoya Horiguchi wrote: > > On Sun, Jan 26, 2014 at 07:52:21PM -0800, Davidlohr Bueso wrote: > > > From: Joonsoo Kim > > > > > > There is a race condition if we map a same file on d

Re: [PATCH 3/8] mm, hugetlb: fix race in region tracking

2014-01-27 Thread Davidlohr Bueso
On Mon, 2014-01-27 at 16:02 -0500, Naoya Horiguchi wrote: > On Sun, Jan 26, 2014 at 07:52:21PM -0800, Davidlohr Bueso wrote: > > From: Joonsoo Kim > > > > There is a race condition if we map a same file on different processes. > > Region tracking is protected by mmap_sem and hugetlb_instantiation

Re: [PATCH 3/8] mm, hugetlb: fix race in region tracking

2014-01-27 Thread Naoya Horiguchi
On Sun, Jan 26, 2014 at 07:52:21PM -0800, Davidlohr Bueso wrote: > From: Joonsoo Kim > > There is a race condition if we map a same file on different processes. > Region tracking is protected by mmap_sem and hugetlb_instantiation_mutex. > When we do mmap, we don't grab a hugetlb_instantiation_mut

[PATCH 3/8] mm, hugetlb: fix race in region tracking

2014-01-26 Thread Davidlohr Bueso
From: Joonsoo Kim There is a race condition if we map a same file on different processes. Region tracking is protected by mmap_sem and hugetlb_instantiation_mutex. When we do mmap, we don't grab a hugetlb_instantiation_mutex, but only the, mmap_sem (exclusively). This doesn't prevent other tasks