From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: "Yanping Du" <Yanping.Du@datadomain.com>
Cc: kosaki.motohiro@jp.fujitsu.com, <linux-kernel@vger.kernel.org>,
<yanping.du@gmail.com>
Subject: Re: mlock() return value issue in kernel 2.6.23.17
Date: Wed, 8 Oct 2008 09:59:13 +0900 (JST) [thread overview]
Message-ID: <20081008094111.9BBF.KOSAKI.MOTOHIRO@jp.fujitsu.com> (raw)
In-Reply-To: <7FF8E1C68090A144B921AFD6A6736A7303FC3879@sjcex01.DataDomain.com>
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 ;)
next prev parent reply other threads:[~2008-10-08 0:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-07 22:24 Yanping Du
2008-10-08 0:59 ` KOSAKI Motohiro [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-08-01 10:06 Halesh S
2008-08-01 8:30 Halesh S
2008-08-01 8:56 ` KOSAKI Motohiro
2008-07-31 10:15 Halesh
2008-07-31 12:50 ` KOSAKI Motohiro
2008-07-31 21:30 ` Andrew Morton
2008-08-01 7:23 ` KOSAKI Motohiro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081008094111.9BBF.KOSAKI.MOTOHIRO@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=Yanping.Du@datadomain.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yanping.du@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®