aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorVadim Lobanov <vlobanov@speakeasy.net>2006-07-14 03:24:01 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-15 00:53:52 -0400
commit8477b55ba11a49515b26573a90414b718179c908 (patch)
tree6a7f5f4c48242f071ae86e5a8c947bf905116d5b /arch
parente78a887a5942d06c81ccf0793fbf2bd83e982122 (diff)
[PATCH] i386: remove redundant might_sleep() in user accessors.
On i386, the user space accessor functions copy_from/to_user() both invoke might_sleep(), do a quick sanity check, and then pass the work on to their __copy_from/to_user() counterparts, which again invoke might_sleep(). Given that no actual work happens between these two calls, it is best to eliminate one of the redundant might_sleep()s. Signed-off-by: Vadim Lobanov <vlobanov@speakeasy.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/lib/usercopy.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/i386/lib/usercopy.c b/arch/i386/lib/usercopy.c
index 4b75212ab6dd..efc7e7d5f4d0 100644
--- a/arch/i386/lib/usercopy.c
+++ b/arch/i386/lib/usercopy.c
@@ -843,7 +843,6 @@ unsigned long __copy_from_user_ll_nocache_nozero(void *to, const void __user *fr
843unsigned long 843unsigned long
844copy_to_user(void __user *to, const void *from, unsigned long n) 844copy_to_user(void __user *to, const void *from, unsigned long n)
845{ 845{
846 might_sleep();
847 BUG_ON((long) n < 0); 846 BUG_ON((long) n < 0);
848 if (access_ok(VERIFY_WRITE, to, n)) 847 if (access_ok(VERIFY_WRITE, to, n))
849 n = __copy_to_user(to, from, n); 848 n = __copy_to_user(to, from, n);
@@ -870,7 +869,6 @@ EXPORT_SYMBOL(copy_to_user);
870unsigned long 869unsigned long
871copy_from_user(void *to, const void __user *from, unsigned long n) 870copy_from_user(void *to, const void __user *from, unsigned long n)
872{ 871{
873 might_sleep();
874 BUG_ON((long) n < 0); 872 BUG_ON((long) n < 0);
875 if (access_ok(VERIFY_READ, from, n)) 873 if (access_ok(VERIFY_READ, from, n))
876 n = __copy_from_user(to, from, n); 874 n = __copy_from_user(to, from, n);