[PATCH] RLIMIT_MEMLOCK accounting of shmctl() SHM_LOCK is broken
The accounting of shmctl() SHM_LOCK memory locks against the user structure is broken. The check of the size of the to-be-locked region is based on the size of the segment as specified when it was created by shmget() (this size is *not* rounded up to a page boundary). Fix it by rounding the size properlt. Also, tune up the spinlock coverage in there a little. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing
Please register or sign in to comment