linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "tip-bot for Michael S. Tsirkin" <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	a.p.zijlstra@chello.nl, torvalds@linux-foundation.org,
	mst@redhat.com, peterz@infradead.org, akpm@linux-foundation.org,
	tglx@linutronix.de
Subject: [tip:sched/mm] m32r: uaccess s/might_sleep/might_fault/
Date: Tue, 28 May 2013 06:18:13 -0700	[thread overview]
Message-ID: <tip-01682576d5fd1c92b96d79560b17208a6567c331@git.kernel.org> (raw)
In-Reply-To: <1369577426-26721-4-git-send-email-mst@redhat.com>

Commit-ID:  01682576d5fd1c92b96d79560b17208a6567c331
Gitweb:     http://git.kernel.org/tip/01682576d5fd1c92b96d79560b17208a6567c331
Author:     Michael S. Tsirkin <mst@redhat.com>
AuthorDate: Sun, 26 May 2013 17:30:51 +0300
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 28 May 2013 09:41:07 +0200

m32r: uaccess s/might_sleep/might_fault/

The only reason uaccess routines might sleep
is if they fault. Make this explicit.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1369577426-26721-4-git-send-email-mst@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/m32r/include/asm/uaccess.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/m32r/include/asm/uaccess.h b/arch/m32r/include/asm/uaccess.h
index 1c7047b..84fe7ba 100644
--- a/arch/m32r/include/asm/uaccess.h
+++ b/arch/m32r/include/asm/uaccess.h
@@ -216,7 +216,7 @@ extern int fixup_exception(struct pt_regs *regs);
 ({									\
 	long __gu_err = 0;						\
 	unsigned long __gu_val;						\
-	might_sleep();							\
+	might_fault();							\
 	__get_user_size(__gu_val,(ptr),(size),__gu_err);		\
 	(x) = (__typeof__(*(ptr)))__gu_val;				\
 	__gu_err;							\
@@ -227,7 +227,7 @@ extern int fixup_exception(struct pt_regs *regs);
 	long __gu_err = -EFAULT;					\
 	unsigned long __gu_val = 0;					\
 	const __typeof__(*(ptr)) __user *__gu_addr = (ptr);		\
-	might_sleep();							\
+	might_fault();							\
 	if (access_ok(VERIFY_READ,__gu_addr,size))			\
 		__get_user_size(__gu_val,__gu_addr,(size),__gu_err);	\
 	(x) = (__typeof__(*(ptr)))__gu_val;				\
@@ -295,7 +295,7 @@ do {									\
 #define __put_user_nocheck(x,ptr,size)					\
 ({									\
 	long __pu_err;							\
-	might_sleep();							\
+	might_fault();							\
 	__put_user_size((x),(ptr),(size),__pu_err);			\
 	__pu_err;							\
 })
@@ -305,7 +305,7 @@ do {									\
 ({									\
 	long __pu_err = -EFAULT;					\
 	__typeof__(*(ptr)) __user *__pu_addr = (ptr);			\
-	might_sleep();							\
+	might_fault();							\
 	if (access_ok(VERIFY_WRITE,__pu_addr,size))			\
 		__put_user_size((x),__pu_addr,(size),__pu_err);		\
 	__pu_err;							\
@@ -597,7 +597,7 @@ unsigned long __generic_copy_from_user(void *, const void __user *, unsigned lon
  */
 #define copy_to_user(to,from,n)				\
 ({							\
-	might_sleep();					\
+	might_fault();					\
 	__generic_copy_to_user((to),(from),(n));	\
 })
 
@@ -638,7 +638,7 @@ unsigned long __generic_copy_from_user(void *, const void __user *, unsigned lon
  */
 #define copy_from_user(to,from,n)			\
 ({							\
-	might_sleep();					\
+	might_fault();					\
 	__generic_copy_from_user((to),(from),(n));	\
 })
 

  reply	other threads:[~2013-05-28 13:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-26 14:21 [PATCH v3-resend 00/11] uaccess: better might_sleep/might_fault behavior Michael S. Tsirkin
2013-05-26 14:30 ` [PATCH v3-resend 01/11] asm-generic: uaccess s/might_sleep/might_fault/ Michael S. Tsirkin
2013-05-28 13:14   ` [tip:sched/mm] " tip-bot for Michael S. Tsirkin
2013-05-26 14:30 ` [PATCH v3-resend 02/11] arm64: " Michael S. Tsirkin
2013-05-28 13:15   ` [tip:sched/mm] " tip-bot for Michael S. Tsirkin
2013-05-26 14:30 ` [PATCH v3-resend 03/11] frv: " Michael S. Tsirkin
2013-05-28 13:16   ` [tip:sched/mm] " tip-bot for Michael S. Tsirkin
2013-05-26 14:30 ` [PATCH v3-resend 04/11] m32r: " Michael S. Tsirkin
2013-05-28 13:18   ` tip-bot for Michael S. Tsirkin [this message]
2013-05-26 14:30 ` [PATCH v3-resend 05/11] microblaze: " Michael S. Tsirkin
2013-05-28 13:19   ` [tip:sched/mm] " tip-bot for Michael S. Tsirkin
2013-05-26 14:31 ` [PATCH v3-resend 06/11] mn10300: " Michael S. Tsirkin
2013-05-28 13:20   ` [tip:sched/mm] " tip-bot for Michael S. Tsirkin
2013-05-26 14:31 ` [PATCH v3-resend 07/11] powerpc: " Michael S. Tsirkin
2013-05-27  9:36   ` Benjamin Herrenschmidt
2013-05-28 13:22   ` [tip:sched/mm] " tip-bot for Michael S. Tsirkin
2013-05-26 14:31 ` [PATCH v3-resend 08/11] tile: " Michael S. Tsirkin
2013-05-28 13:23   ` [tip:sched/mm] " tip-bot for Michael S. Tsirkin
2013-05-26 14:31 ` [PATCH v3-resend 09/11] x86: " Michael S. Tsirkin
2013-05-28 13:24   ` [tip:sched/mm] " tip-bot for Michael S. Tsirkin
2013-05-26 14:32 ` [PATCH v3-resend 10/11] kernel: drop voluntary schedule from might_fault Michael S. Tsirkin
2013-05-28 13:25   ` [tip:sched/mm] mm, sched: Drop voluntary schedule from might_fault() tip-bot for Michael S. Tsirkin
2013-05-26 14:32 ` [PATCH v3-resend 11/11] kernel: uaccess in atomic with pagefault_disable Michael S. Tsirkin
2013-05-28 13:27   ` [tip:sched/mm] mm, sched: Allow uaccess in atomic with pagefault_disable() tip-bot for Michael S. Tsirkin
2013-05-27 16:35 ` [PATCH v3-resend 00/11] uaccess: better might_sleep/might_fault behavior Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-01682576d5fd1c92b96d79560b17208a6567c331@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mst@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).