Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752616AbbH1SnD (ORCPT ); Fri, 28 Aug 2015 14:43:03 -0400 Received: from a23-79-238-179.deploy.static.akamaitechnologies.com ([23.79.238.179]:31577 "EHLO prod-mail-xrelay05.akamai.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752446AbbH1SnA (ORCPT ); Fri, 28 Aug 2015 14:43:00 -0400 From: Eric B Munson To: mtk.manpages@gmail.com Cc: Eric B Munson , Michal Hocko , David Rientjes , linux-man@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mremap.2: Add note about mremap with locked areas Date: Fri, 28 Aug 2015 14:42:52 -0400 Message-Id: <1440787372-30214-1-git-send-email-emunson@akamai.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1347 Lines: 46 When mremap() is used to move or expand a mapping that is locked with mlock() or equivalent it will attempt to populate the new area. However, like mmap(MAP_LOCKED), mremap() will not fail if the area cannot be populated. Also like mmap(MAP_LOCKED) this might come as a surprise to users and should be noted. Signed-off-by: Eric B Munson Cc: Michal Hocko Cc: David Rientjes Cc: linux-man@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org --- man2/mremap.2 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/man2/mremap.2 b/man2/mremap.2 index 071adb5..cf884e6 100644 --- a/man2/mremap.2 +++ b/man2/mremap.2 @@ -196,6 +196,17 @@ and the prototype for did not allow for the .I new_address argument. + +If +.BR mremap () +is used to move or expand an area locked with +.BR mlock (2) +or equivalent, the +.BR mremap () +call will make a best effort to populate the new area but will not fail +with +.B ENOMEM +if the area cannot be populated. .SH SEE ALSO .BR brk (2), .BR getpagesize (2), -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/