lkml.org 
[lkml]   [2004]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] MAP_POPULATE prot 0
    It seems eccentric to implement MAP_POPULATE only on PROT_NONE mappings:
    do_mmap_pgoff is passing down prot, then sys_remap_file_pages verifies
    it's not set. I guess that's an oversight from when we realized that
    the prot arg to sys_remap_file_pages was misdesigned.

    There's another oddity whose heritage is harder for me to understand,
    so please let me leave it to you: sys_remap_file_pages is declared as
    asmlinkage in mm/fremap.c, but is the one syscall declared without
    asmlinkage in include/linux/syscalls.h.

    Signed-off-by: Hugh Dickins <hugh@veritas.com>

    --- 2.6.7-rc1/mm/mmap.c 2004-05-24 12:17:56.209179464 +0100
    +++ linux/mm/mmap.c 2004-05-24 19:33:40.265678752 +0100
    @@ -951,7 +951,7 @@ out:
    }
    if (flags & MAP_POPULATE) {
    up_write(&mm->mmap_sem);
    - sys_remap_file_pages(addr, len, prot,
    + sys_remap_file_pages(addr, len, 0,
    pgoff, flags & MAP_NONBLOCK);
    down_write(&mm->mmap_sem);
    }
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:03    [W:0.019 / U:1.296 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site