Title: [6594] branches/2009R1/arch/blackfin/include/asm/uaccess.h: dont check the length given to strnlen_user() since some parts of the
- Revision
- 6594
- Author
- sonicz
- Date
- 2009-06-04 23:40:39 -0500 (Thu, 04 Jun 2009)
Log Message
dont check the length given to strnlen_user() since some parts of the
kernel give unrealistically large sizes which never validate on no-mmu
Modified Paths
Diff
Modified: branches/2009R1/arch/blackfin/include/asm/uaccess.h (6593 => 6594)
--- branches/2009R1/arch/blackfin/include/asm/uaccess.h 2009-06-05 04:37:59 UTC (rev 6593)
+++ branches/2009R1/arch/blackfin/include/asm/uaccess.h 2009-06-05 04:40:39 UTC (rev 6594)
@@ -245,13 +245,11 @@
*/
static inline long __must_check strnlen_user(const char *src, long n)
{
- if (!access_ok(VERIFY_READ, src, n))
+ if (!access_ok(VERIFY_READ, src, 1))
return 0;
return strnlen(src, n) + 1;
}
-/* We don't know the length, so only check the start of the string */
-
static inline long __must_check strlen_user(const char *src)
{
if (!access_ok(VERIFY_READ, src, 1))
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits