patch-2.1.20 linux/arch/i386/kernel/ptrace.c
Next file: linux/arch/i386/kernel/signal.c
Previous file: linux/arch/i386/kernel/process.c
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
Thu Jan 2 15:43:29 1997
- Orig file:
v2.1.19/linux/arch/i386/kernel/ptrace.c
- Orig date:
Tue Oct 29 19:58:02 1996
diff -u --recursive --new-file v2.1.19/linux/arch/i386/kernel/ptrace.c linux/arch/i386/kernel/ptrace.c
@@ -421,24 +421,17 @@
res = read_long(child, addr, &tmp);
if (res < 0)
return res;
- res = verify_area(VERIFY_WRITE, (void *) data, sizeof(long));
- if (!res)
- put_user(tmp,(unsigned long *) data);
- return res;
+ return put_user(tmp,(unsigned long *) data);
}
/* read the word at location addr in the USER area. */
case PTRACE_PEEKUSR: {
unsigned long tmp;
- int res;
if ((addr & 3) || addr < 0 ||
addr > sizeof(struct user) - 3)
return -EIO;
- res = verify_area(VERIFY_WRITE, (void *) data, sizeof(long));
- if (res)
- return res;
tmp = 0; /* Default return condition */
if(addr < 17*sizeof(long))
tmp = getreg(child, addr);
@@ -448,8 +441,7 @@
addr = addr >> 2;
tmp = child->debugreg[addr];
};
- put_user(tmp,(unsigned long *) data);
- return 0;
+ return put_user(tmp,(unsigned long *) data);
}
/* when I and D space are separate, this will have to be fixed. */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov