mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
microblaze: 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 <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
01682576d5
commit
ac093f8d5e
1 changed files with 3 additions and 3 deletions
|
|
@ -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,
|
||||
unsigned long n)
|
||||
{
|
||||
might_sleep();
|
||||
might_fault();
|
||||
if (unlikely(!access_ok(VERIFY_WRITE, to, n)))
|
||||
return n;
|
||||
|
||||
|
|
@ -371,7 +371,7 @@ extern long __user_bad(void);
|
|||
static inline long copy_from_user(void *to,
|
||||
const void __user *from, unsigned long n)
|
||||
{
|
||||
might_sleep();
|
||||
might_fault();
|
||||
if (access_ok(VERIFY_READ, from, n))
|
||||
return __copy_from_user(to, from, n);
|
||||
return n;
|
||||
|
|
@ -385,7 +385,7 @@ static inline long copy_from_user(void *to,
|
|||
static inline long copy_to_user(void __user *to,
|
||||
const void *from, unsigned long n)
|
||||
{
|
||||
might_sleep();
|
||||
might_fault();
|
||||
if (access_ok(VERIFY_WRITE, to, n))
|
||||
return __copy_to_user(to, from, n);
|
||||
return n;
|
||||
|
|
|
|||
Loading…
Reference in a new issue