Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ac093f8d authored by Michael S. Tsirkin's avatar Michael S. Tsirkin Committed by Ingo Molnar
Browse files

microblaze: uaccess s/might_sleep/might_fault/



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

Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarPeter 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-5-git-send-email-mst@redhat.com


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 01682576
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -145,7 +145,7 @@ static inline unsigned long __must_check __clear_user(void __user *to,
static inline unsigned long __must_check clear_user(void __user *to,
static inline unsigned long __must_check clear_user(void __user *to,
							unsigned long n)
							unsigned long n)
{
{
	might_sleep();
	might_fault();
	if (unlikely(!access_ok(VERIFY_WRITE, to, n)))
	if (unlikely(!access_ok(VERIFY_WRITE, to, n)))
		return n;
		return n;


@@ -371,7 +371,7 @@ extern long __user_bad(void);
static inline long copy_from_user(void *to,
static inline long copy_from_user(void *to,
		const void __user *from, unsigned long n)
		const void __user *from, unsigned long n)
{
{
	might_sleep();
	might_fault();
	if (access_ok(VERIFY_READ, from, n))
	if (access_ok(VERIFY_READ, from, n))
		return __copy_from_user(to, from, n);
		return __copy_from_user(to, from, n);
	return n;
	return n;
@@ -385,7 +385,7 @@ static inline long copy_from_user(void *to,
static inline long copy_to_user(void __user *to,
static inline long copy_to_user(void __user *to,
		const void *from, unsigned long n)
		const void *from, unsigned long n)
{
{
	might_sleep();
	might_fault();
	if (access_ok(VERIFY_WRITE, to, n))
	if (access_ok(VERIFY_WRITE, to, n))
		return __copy_to_user(to, from, n);
		return __copy_to_user(to, from, n);
	return n;
	return n;