Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1370688

Re: [PATCH 0/3] mm/mmap.c: don't unmap the overlapping VMA(s)

From Vlastimil Babka <vbabka@suse.cz>
Newsgroups linux.kernel
Subject Re: [PATCH 0/3] mm/mmap.c: don't unmap the overlapping VMA(s)
Date 2016-04-04 17:30 +0200
Message-ID <rkeBY-52d-13@gated-at.bofh.it> (permalink)
References <rjzfr-8pJ-3@gated-at.bofh.it> <rk7h8-8aW-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 04/04/2016 09:31 AM, Michal Hocko wrote:
> On Sat 02-04-16 21:17:31, Piotr Kwapulinski wrote:
>> Currently the mmap(MAP_FIXED) discards the overlapping part of the
>> existing VMA(s).
>> Introduce the new MAP_DONTUNMAP flag which forces the mmap to fail
>> with ENOMEM whenever the overlapping occurs and MAP_FIXED is set.
>> No existing mapping(s) is discarded.
>
> You forgot to tell us what is the use case for this new flag.

Exactly. Also, returning ENOMEM is strange, EINVAL might be a better 
match, otherwise how would you distinguish a "geunine" ENOMEM from 
passing a wrong address?

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] mm/mmap.c: don't unmap the overlapping VMA(s) Piotr Kwapulinski <kwapulinski.piotr@gmail.com> - 2016-04-02 21:20 +0200
  [PATCH 1/3] man/mmap.2: don't unmap the overlapping VMA(s) Piotr Kwapulinski <kwapulinski.piotr@gmail.com> - 2016-04-02 21:20 +0200
  Re: [PATCH 0/3] mm/mmap.c: don't unmap the overlapping VMA(s) "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-04-03 00:00 +0200
  Re: [PATCH 0/3] mm/mmap.c: don't unmap the overlapping VMA(s) Konstantin Khlebnikov <koct9i@gmail.com> - 2016-04-03 08:00 +0200
  Re: [PATCH 0/3] mm/mmap.c: don't unmap the overlapping VMA(s) Michal Hocko <mhocko@kernel.org> - 2016-04-04 09:40 +0200
    Re: [PATCH 0/3] mm/mmap.c: don't unmap the overlapping VMA(s) Vlastimil Babka <vbabka@suse.cz> - 2016-04-04 17:30 +0200
      Re: [PATCH 0/3] mm/mmap.c: don't unmap the overlapping VMA(s) Piotr Kwapulinski <kwapulinski.piotr@gmail.com> - 2016-04-07 18:20 +0200
        Re: [PATCH 0/3] mm/mmap.c: don't unmap the overlapping VMA(s) Michal Hocko <mhocko@kernel.org> - 2016-04-07 18:40 +0200
          Re: [PATCH 0/3] mm/mmap.c: don't unmap the overlapping VMA(s) Piotr Kwapulinski <kwapulinski.piotr@gmail.com> - 2016-04-08 17:40 +0200
      Re: [PATCH 0/3] mm/mmap.c: don't unmap the overlapping VMA(s) Piotr Kwapulinski <kwapulinski.piotr@gmail.com> - 2016-04-07 18:30 +0200

csiph-web