Skip to contentSkip to conversation

mlock.2: generalize EPERM description

PATCH In review Seonghun Lim 2 participants 2 messages Aug 31, 2011 – Sep 17, 2011 1 message not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mlock.2: generalize EPERM description

man-pages version: latest git repository
why: EPERM error code is not only set by munlock(), but also by other calls.

man2/mlock.2 +0 -0
@@ -151,8 +151,7 @@ soft resource limit was 0.

.TP
.B EPERM
(Linux 2.6.8 and earlier)
-The calling process has insufficient privilege to call -.BR munlockall ().
+The calling process has insufficient privilege. Under Linux the
.B CAP_IPC_LOCK
capability is required.

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Hello Seonghun,

2011/8/31 Seonghun Lim <[email protected]>:

Quoted 14 lines

man-pages version: latest git repository
why: EPERM error code is not only set by munlock(), but also by other calls.

man2/mlock.2 +0 -0
@@ -151,8 +151,7 @@ soft resource limit was 0.

.TP
.B EPERM
(Linux 2.6.8 and earlier)

man2/mlock.2 +1 -2
-The calling process has insufficient privilege to call
-.BR munlockall ().
+The calling process has insufficient privilege.
Quoted 3 lines

Under Linux the
.B CAP_IPC_LOCK
capability is required.

Thanks for the report. Instead, I applied a simplifying patch for 3.33.

Thanks,

Michael

man2/mlock.2 +3 -13
index 45f5f1d..535a7db 100644
@@ -24,7 +24,7 @@
 .\" Software Foundation, Inc., 59 Temple Place, Suite 330,
 .\" Boston, MA 02111, USA.
 .\"
-.TH MLOCK 2 2010-10-30 "Linux" "Linux Programmer's Manual"
+.TH MLOCK 2 2011-09-10 "Linux" "Linux Programmer's Manual"
 .SH NAME
 mlock, munlock, mlockall, munlockall \- lock and unlock memory
 .SH SYNOPSIS
@@ -143,19 +143,9 @@ half of RAM.
 .\" pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
 .TP
 .B EPERM
-(Linux 2.6.9 and later) the caller was not privileged
+The caller is not privileged, but needs privilege
 .RB ( CAP_IPC_LOCK )
-and its
-.B RLIMIT_MEMLOCK
-soft resource limit was 0.
-.TP
-.B EPERM
-(Linux 2.6.8 and earlier)
-The calling process has insufficient privilege to call
-.BR munlockall ().
-Under Linux the
-.B CAP_IPC_LOCK
-capability is required.
+to perform the requested operation.
 .\"SVr4 documents an additional EAGAIN error code.
 .LP
 For
Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html