patch-2.4.19 linux-2.4.19/include/asm-ppc/uaccess.h
Next file: linux-2.4.19/include/asm-ppc/unistd.h
Previous file: linux-2.4.19/include/asm-ppc/system.h
Back to the patch index
Back to the overall index
- Lines: 20
- Date:
Fri Aug 2 17:39:45 2002
- Orig file:
linux-2.4.18/include/asm-ppc/uaccess.h
- Orig date:
Tue Sep 11 17:03:33 2001
diff -urN linux-2.4.18/include/asm-ppc/uaccess.h linux-2.4.19/include/asm-ppc/uaccess.h
@@ -1,5 +1,5 @@
/*
- * BK Id: SCCS/s.uaccess.h 1.8 09/11/01 18:10:06 paulus
+ * BK Id: SCCS/s.uaccess.h 1.10 05/21/02 21:44:32 paulus
*/
#ifdef __KERNEL__
#ifndef _PPC_UACCESS_H
@@ -272,7 +272,11 @@
{
if (access_ok(VERIFY_WRITE, addr, size))
return __clear_user(addr, size);
- return size? -EFAULT: 0;
+ if ((unsigned long)addr < TASK_SIZE) {
+ unsigned long over = (unsigned long)addr + size - TASK_SIZE;
+ return __clear_user(addr, size - over) + over;
+ }
+ return size;
}
extern int __strncpy_from_user(char *dst, const char *src, long count);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)