lkml.org 
[lkml]   [2010]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4][RESENT] add MAP_UNLOCKED mmap flag
* Gleb Natapov (gleb@redhat.com) wrote:
> v3->v4
> - return error if MAP_LOCKED | MAP_UNLOCKED is specified
...
> --- a/mm/mmap.c
> +++ b/mm/mmap.c
> @@ -962,6 +962,12 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
> if (!can_do_mlock())
> return -EPERM;
>
> + if (flags & MAP_UNLOCKED)
> + vm_flags &= ~VM_LOCKED;
> +
> + if (flags & MAP_UNLOCKED)
> + vm_flags &= ~VM_LOCKED;
> +
> /* mlock MCL_FUTURE? */
> if (vm_flags & VM_LOCKED) {
> unsigned long locked, lock_limit;

Looks like same patch applied twice rather than adding the
(MAP_LOCKED | MAP_UNLOCKED) check.


\
 
 \ /
  Last update: 2010-01-13 00:25    [W:0.051 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site