patch-2.4.19 linux-2.4.19/arch/ia64/ia32/sys_ia32.c
Next file: linux-2.4.19/arch/ia64/kernel/Makefile
Previous file: linux-2.4.19/arch/ia64/ia32/ia32_traps.c
Back to the patch index
Back to the overall index
- Lines: 54
- Date:
Fri Aug 2 17:39:42 2002
- Orig file:
linux-2.4.18/arch/ia64/ia32/sys_ia32.c
- Orig date:
Fri Nov 9 14:26:17 2001
diff -urN linux-2.4.18/arch/ia64/ia32/sys_ia32.c linux-2.4.19/arch/ia64/ia32/sys_ia32.c
@@ -6,7 +6,7 @@
* Copyright (C) 1999 Arun Sharma <arun.sharma@intel.com>
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
* Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
- * Copyright (C) 2000-2001 Hewlett-Packard Co
+ * Copyright (C) 2000-2002 Hewlett-Packard Co
* David Mosberger-Tang <davidm@hpl.hp.com>
*
* These routines maintain argument size conversion between 32bit and 64bit
@@ -82,6 +82,7 @@
/* forward declaration: */
asmlinkage long sys32_mprotect (unsigned int, unsigned int, int);
+asmlinkage unsigned long sys_brk(unsigned long);
/*
* Anything that modifies or inspects ia32 user virtual memory must hold this semaphore
@@ -412,7 +413,7 @@
return -EINVAL;
}
if (!(prot & PROT_WRITE) && sys_mprotect(pstart, pend - pstart, prot) < 0)
- return EINVAL;
+ return -EINVAL;
}
return start;
}
@@ -2590,6 +2591,7 @@
default:
return -EINVAL;
}
+ return -EINVAL;
}
/*
@@ -3810,6 +3812,19 @@
return ret;
}
+asmlinkage unsigned long
+sys32_brk (unsigned int brk)
+{
+ unsigned long ret, obrk;
+ struct mm_struct *mm = current->mm;
+
+ obrk = mm->brk;
+ ret = sys_brk(brk);
+ if (ret < obrk)
+ clear_user((void *) ret, PAGE_ALIGN(ret) - ret);
+ return ret;
+}
+
#ifdef NOTYET /* UNTESTED FOR IA64 FROM HERE DOWN */
struct ncp_mount_data32 {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)