public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC] x86: uaccess s/might_sleep/might_fault/
@ 2013-05-02  2:21 Michael S. Tsirkin
  2013-05-02  8:52 ` Ingo Molnar
  0 siblings, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2013-05-02  2:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Fenghua Yu

The only reason uaccess routines might sleep
is if they fault. Make this explicit for
__copy_from_user_nocache, and consistent with
copy_from_user and friends.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---

I've updated all other arches as well - still
build-testing. Any objections to the x86 patch?

 arch/x86/include/asm/uaccess_64.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/uaccess_64.h b/arch/x86/include/asm/uaccess_64.h
index 142810c..4f7923d 100644
--- a/arch/x86/include/asm/uaccess_64.h
+++ b/arch/x86/include/asm/uaccess_64.h
@@ -235,7 +235,7 @@ extern long __copy_user_nocache(void *dst, const void __user *src,
 static inline int
 __copy_from_user_nocache(void *dst, const void __user *src, unsigned size)
 {
-	might_sleep();
+	might_fault();
 	return __copy_user_nocache(dst, src, size, 1);
 }
 
-- 
MST

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-07 10:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-02  2:21 [PATCH RFC] x86: uaccess s/might_sleep/might_fault/ Michael S. Tsirkin
2013-05-02  8:52 ` Ingo Molnar
2013-05-02 13:28   ` Michael S. Tsirkin
2013-05-07 10:11     ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox