[patch] 2.3.31: remove some cruft from module.c

Chris Sears (dbsears@ix.netcom.com)
Sun, 12 Dec 1999 20:45:54 -0800


This is a simple patch to 2.3.31 to remove some useless cruft
in kernel/module.c In qm_symbols() there is a call to
access_ok() to check if the user memory is writeable.
But the memory will be written with copy_to_user()
which contains its own call to access_ok()

copy_to_user() //
include/asm-i386/uaccess.h
__generic_copy_to_user() // arch/i386/lib/usercopy.c
access_ok()

Furthermore, this is the only routine in module.c
which has this access_ok() check.

Chris Sears
dbsears@ix.netcom.com

--- module.c~ Sun Dec 12 20:21:09 1999
+++ module.c Sun Dec 12 20:21:19 1999
@@ -558,9 +558,6 @@
if (space > bufsize)
goto calc_space_needed;

- if (!access_ok(VERIFY_WRITE, buf, space))
- return -EFAULT;
-
bufsize -= space;
vals = (unsigned long *)buf;
strings = buf+space;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/