public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix return value after hugetlb mmap failure
@ 2003-06-30  1:01 Anton Blanchard
  0 siblings, 0 replies; only message in thread
From: Anton Blanchard @ 2003-06-30  1:01 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, linux-kernel


Hi,

At the moment no one uses is_aligned_hugepage_range or is_hugepage_only_range,
but it is reasonable to assume they return true or false. 

On error we want to return -EINVAL back to userspace.

Anton

===== /mnt/kernels/linux-2.5/mm/mmap.c 1.86 vs edited =====
--- 1.86/mm/mmap.c	Thu Jun 26 09:30:53 2003
+++ edited//mnt/kernels/linux-2.5/mm/mmap.c	Mon Jun 30 10:56:22 2003
@@ -846,7 +846,7 @@
 			ret = is_hugepage_only_range(addr, len);
 		}
 		if (ret)
-			return ret;
+			return -EINVAL;
 		return addr;
 	}
 

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

only message in thread, other threads:[~2003-06-30  0:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-30  1:01 [PATCH] fix return value after hugetlb mmap failure Anton Blanchard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox