patch-2.2.15 linux/arch/i386/kernel/ptrace.c

Next file: linux/arch/i386/kernel/setup.c
Previous file: linux/arch/i386/kernel/process.c
Back to the patch index
Back to the overall index

diff -u --new-file --recursive --exclude-from ../../exclude v2.2.14/arch/i386/kernel/ptrace.c linux/arch/i386/kernel/ptrace.c
@@ -11,6 +11,7 @@
 #include <linux/errno.h>
 #include <linux/ptrace.h>
 #include <linux/user.h>
+#include <linux/sys.h> 
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
@@ -320,7 +321,9 @@
 {
 	switch (regno >> 2) {
 		case ORIG_EAX:
-			return -EIO;
+			if(value >= NR_syscalls)
+				return -EIO;
+			break;
 		case FS:
 			if (value && (value & 3) != 3)
 				return -EIO;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)