lkml.org 
[lkml]   [2008]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: mlock() return value issue in kernel 2.6.23.17
Date
Hi Yanping,

> Hi Kosaki,
>
> Seems SUSv3 has more requirements beyond errno return code. Upon
> failure (EAGAIN, etc), it requires .no change is made to any locks in
> the address space of the process., but Linux mlock(2) will set vma flag
> as VM_LOCKED even if make_pages_present() fails for some pages in the
> vma. Any comment on this ?
>
> SUSv3: http://www.unix.org/single_unix_specification/
>
> "Upon successful completion, the mlock() and munlock() functions shall
> return a value of zero. Otherwise, no change is made to any locks in the
> address space of the process, and the function shall return a value of
> -1 and set errno to indicate the error."

Correct.

However, I haven't seen this behavior cause any trouble.
Do you know any case?

So, if nobody feel awful, I don't interest it so much ;)





\
 
 \ /
  Last update: 2008-10-08 03:01    [W:0.040 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site