mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] NOMMU: Fix an incorrect comment in the do_mmap_shared_file()
@ 2010-03-16 11:47 David Howells
  0 siblings, 0 replies; only message in thread
From: David Howells @ 2010-03-16 11:47 UTC (permalink / raw)
  To: torvalds, akpm; +Cc: linux-kernel, uclinux-dev, David Howells

Fix an incorrect comment in the do_mmap_shared_file().  If a mapping is
requested MAP_SHARED, then a private copy cannot be made and still provide
correct semantics.

Reported-by: Dave Hudson <uclinux@blueteddy.net>
Signed-off-by: David Howells <dhowells@redhat.com>
---

 mm/nommu.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)


diff --git a/mm/nommu.c b/mm/nommu.c
index 605ace8..e4b8f4d 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -1040,10 +1040,9 @@ static int do_mmap_shared_file(struct vm_area_struct *vma)
 	if (ret != -ENOSYS)
 		return ret;
 
-	/* getting an ENOSYS error indicates that direct mmap isn't
-	 * possible (as opposed to tried but failed) so we'll fall
-	 * through to making a private copy of the data and mapping
-	 * that if we can */
+	/* getting -ENOSYS indicates that direct mmap isn't possible (as
+	 * opposed to tried but failed) so we can only give a suitable error as
+	 * it's not possible to make a private copy if MAP_SHARED was given */
 	return -ENODEV;
 }
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-03-16 11:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-16 11:47 [PATCH] NOMMU: Fix an incorrect comment in the do_mmap_shared_file() David Howells

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®