lkml.org 
[lkml]   [1999]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] 2.3.31: remove some cruft from module.c

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/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.035 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site