Title: [3974] trunk: Bug[#3594]
Revision
3974
Author
bernds
Date
2007-12-03 08:46:39 -0600 (Mon, 03 Dec 2007)

Log Message

Bug[#3594]
Revert revision 3804, while fixing style issues.

Diffstat

 arch/blackfin/kernel/process.c |    2 ++
 include/asm-blackfin/uaccess.h |   16 +++++-----------
 2 files changed, 7 insertions(+), 11 deletions(-)

Modified Paths

Diff

Modified: trunk/arch/blackfin/kernel/process.c (3973 => 3974)


--- trunk/arch/blackfin/kernel/process.c	2007-12-03 14:30:10 UTC (rev 3973)
+++ trunk/arch/blackfin/kernel/process.c	2007-12-03 14:46:39 UTC (rev 3974)
@@ -328,6 +328,8 @@
 /* Return 1 if access to memory range is OK, 0 otherwise */
 int _access_ok(unsigned long addr, unsigned long size)
 {
+	if (size == 0)
+		return 1;
 	if (addr > (addr + size))
 		return 0;
 	if (segment_eq(get_fs(), KERNEL_DS))

Modified: trunk/include/asm-blackfin/uaccess.h (3973 => 3974)


--- trunk/include/asm-blackfin/uaccess.h	2007-12-03 14:30:10 UTC (rev 3973)
+++ trunk/include/asm-blackfin/uaccess.h	2007-12-03 14:46:39 UTC (rev 3974)
@@ -28,6 +28,11 @@
 
 #define segment_eq(a,b) ((a) == (b))
 
+#define VERIFY_READ	0
+#define VERIFY_WRITE	1
+
+#define access_ok(type, addr, size) _access_ok((unsigned long)(addr), (size))
+
 static inline int is_in_rom(unsigned long addr)
 {
 	/*
@@ -61,17 +66,6 @@
 #endif
 #endif
 
-#define VERIFY_READ	0
-#define VERIFY_WRITE	1
-
-static inline int access_ok(int type, const void __user *p, unsigned long size)
-{
-	if ((type == VERIFY_READ) && (size == 0))
-		return 1;
-
-	return _access_ok((unsigned long)p, size);
-}
-
 /*
  * The exception table consists of pairs of addresses: the first is the
  * address of an instruction that is allowed to fault, and the second is
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
http://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to