Re: [PATCH v3 03/14] mm, hugetlb: protect region tracking via newly introduced resv_map lock

2014-01-06 Thread Davidlohr Bueso
On Wed, 2013-12-18 at 15:53 +0900, Joonsoo Kim wrote: > 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, > grab a mmap_sem. This

Re: [PATCH v3 03/14] mm, hugetlb: protect region tracking via newly introduced resv_map lock

2014-01-06 Thread Davidlohr Bueso
On Wed, 2013-12-18 at 15:53 +0900, Joonsoo Kim wrote: 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, grab a mmap_sem. This

Re: [PATCH v3 03/14] mm, hugetlb: protect region tracking via newly introduced resv_map lock

2014-01-05 Thread Joonsoo Kim
On Tue, Dec 24, 2013 at 11:00:12PM +1100, David Gibson wrote: > On Mon, Dec 23, 2013 at 10:05:17AM +0900, Joonsoo Kim wrote: > > On Sun, Dec 22, 2013 at 12:58:19AM +1100, David Gibson wrote: > > > On Wed, Dec 18, 2013 at 03:53:49PM +0900, Joonsoo Kim wrote: > > > > There is a race condition if we

Re: [PATCH v3 03/14] mm, hugetlb: protect region tracking via newly introduced resv_map lock

2014-01-05 Thread Joonsoo Kim
On Tue, Dec 24, 2013 at 11:00:12PM +1100, David Gibson wrote: On Mon, Dec 23, 2013 at 10:05:17AM +0900, Joonsoo Kim wrote: On Sun, Dec 22, 2013 at 12:58:19AM +1100, David Gibson wrote: On Wed, Dec 18, 2013 at 03:53:49PM +0900, Joonsoo Kim wrote: There is a race condition if we map a same

Re: [PATCH v3 03/14] mm, hugetlb: protect region tracking via newly introduced resv_map lock

2013-12-24 Thread David Gibson
On Mon, Dec 23, 2013 at 10:05:17AM +0900, Joonsoo Kim wrote: > On Sun, Dec 22, 2013 at 12:58:19AM +1100, David Gibson wrote: > > On Wed, Dec 18, 2013 at 03:53:49PM +0900, Joonsoo Kim wrote: > > > There is a race condition if we map a same file on different processes. > > > Region tracking is

Re: [PATCH v3 03/14] mm, hugetlb: protect region tracking via newly introduced resv_map lock

2013-12-24 Thread David Gibson
On Mon, Dec 23, 2013 at 10:05:17AM +0900, Joonsoo Kim wrote: On Sun, Dec 22, 2013 at 12:58:19AM +1100, David Gibson wrote: On Wed, Dec 18, 2013 at 03:53:49PM +0900, Joonsoo Kim wrote: There is a race condition if we map a same file on different processes. Region tracking is protected by

Re: [PATCH v3 03/14] mm, hugetlb: protect region tracking via newly introduced resv_map lock

2013-12-22 Thread Joonsoo Kim
On Sun, Dec 22, 2013 at 12:58:19AM +1100, David Gibson wrote: > On Wed, Dec 18, 2013 at 03:53:49PM +0900, Joonsoo Kim wrote: > > 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

Re: [PATCH v3 03/14] mm, hugetlb: protect region tracking via newly introduced resv_map lock

2013-12-22 Thread Joonsoo Kim
On Sun, Dec 22, 2013 at 12:58:19AM +1100, David Gibson wrote: On Wed, Dec 18, 2013 at 03:53:49PM +0900, Joonsoo Kim wrote: 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

Re: [PATCH v3 03/14] mm, hugetlb: protect region tracking via newly introduced resv_map lock

2013-12-21 Thread David Gibson
On Wed, Dec 18, 2013 at 03:53:49PM +0900, Joonsoo Kim wrote: > 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, > grab a mmap_sem.

Re: [PATCH v3 03/14] mm, hugetlb: protect region tracking via newly introduced resv_map lock

2013-12-21 Thread David Gibson
On Wed, Dec 18, 2013 at 03:53:49PM +0900, Joonsoo Kim wrote: 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, grab a mmap_sem.

[PATCH v3 03/14] mm, hugetlb: protect region tracking via newly introduced resv_map lock

2013-12-17 Thread 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, grab a mmap_sem. This doesn't prevent other process to modify region structure, so it

[PATCH v3 03/14] mm, hugetlb: protect region tracking via newly introduced resv_map lock

2013-12-17 Thread 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, grab a mmap_sem. This doesn't prevent other process to modify region structure, so it