lkml.org 
[lkml]   [2014]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v3 03/14] mm, hugetlb: protect region tracking via newly introduced resv_map lock
    From
    Date
    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 doesn't prevent other process to modify region
    > structure, so it can be modified by two processes concurrently.
    >
    > To solve this, I introduce a lock to resv_map and make region manipulation
    > function grab a lock before they do actual work. This makes region
    > tracking safe.
    >
    > Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

    Reviewed-by: Davidlohr Bueso <davidlohr@hp.com>



    \
     
     \ /
      Last update: 2014-01-07 04:41    [W:5.601 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site