[PATCH 2.6.5-rc2] LSB compliance fix in mprotect

From: Marc-Christian Petersen
Date: Sat Mar 20 2004 - 15:01:48 EST


Hi Linus, Andrew,

http://linux.bkbits.net:8080/linux-2.4/diffs/mm/mprotect.c@xxx?nav=index.html|
src/|src/mm|hist/mm/mprotect.c

2.4 patch from Adrian.

Please apply.

ciao, Marc
# mm/mprotect.c | 2 +-
# 1 files changed, 1 insertion(+), 1 deletion(-)

diff -Nru a/mm/mprotect.c b/mm/mprotect.c
--- a/mm/mprotect.c Sun Mar 3 10:00:38 2002
+++ b/mm/mprotect.c Thu Sep 4 02:14:56 2003
@@ -237,7 +237,7 @@
len = PAGE_ALIGN(len);
end = start + len;
if (end < start)
- return -EINVAL;
+ return -ENOMEM;
if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC | PROT_SEM))
return -EINVAL;
if (end == start)