Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
61fc8737
Commit
61fc8737
authored
Sep 03, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: add might_sleep() to uaccess functions.
parent
8bee63f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
include/asm-ppc64/uaccess.h
include/asm-ppc64/uaccess.h
+8
-0
No files found.
include/asm-ppc64/uaccess.h
View file @
61fc8737
...
...
@@ -132,6 +132,7 @@ extern long __put_user_bad(void);
#define __put_user_size(x,ptr,size,retval,errret) \
do { \
might_sleep(); \
retval = 0; \
switch (size) { \
case 1: __put_user_asm(x,ptr,retval,"stb",errret); break; \
...
...
@@ -185,6 +186,7 @@ extern long __get_user_bad(void);
#define __get_user_size(x,ptr,size,retval,errret) \
do { \
might_sleep(); \
retval = 0; \
switch (size) { \
case 1: __get_user_asm(x,ptr,retval,"lbz",errret); break; \
...
...
@@ -220,6 +222,7 @@ extern unsigned long __copy_tofrom_user(void *to, const void *from,
static
inline
unsigned
long
__copy_from_user
(
void
*
to
,
const
void
__user
*
from
,
unsigned
long
n
)
{
might_sleep
();
if
(
__builtin_constant_p
(
n
))
{
unsigned
long
ret
;
...
...
@@ -244,6 +247,7 @@ __copy_from_user(void *to, const void __user *from, unsigned long n)
static
inline
unsigned
long
__copy_to_user
(
void
__user
*
to
,
const
void
*
from
,
unsigned
long
n
)
{
might_sleep
();
if
(
__builtin_constant_p
(
n
))
{
unsigned
long
ret
;
...
...
@@ -289,6 +293,7 @@ copy_to_user(void *to, const void *from, unsigned long n)
static
inline
unsigned
long
copy_in_user
(
void
*
to
,
const
void
*
from
,
unsigned
long
n
)
{
might_sleep
();
if
(
likely
(
access_ok
(
VERIFY_READ
,
from
,
n
)
&&
access_ok
(
VERIFY_WRITE
,
to
,
n
)))
n
=
__copy_tofrom_user
(
to
,
from
,
n
);
...
...
@@ -300,6 +305,7 @@ extern unsigned long __clear_user(void *addr, unsigned long size);
static
inline
unsigned
long
clear_user
(
void
*
addr
,
unsigned
long
size
)
{
might_sleep
();
if
(
likely
(
access_ok
(
VERIFY_WRITE
,
addr
,
size
)))
size
=
__clear_user
(
addr
,
size
);
return
size
;
...
...
@@ -310,6 +316,7 @@ extern int __strncpy_from_user(char *dst, const char *src, long count);
static
inline
long
strncpy_from_user
(
char
*
dst
,
const
char
*
src
,
long
count
)
{
might_sleep
();
if
(
likely
(
access_ok
(
VERIFY_READ
,
src
,
1
)))
return
__strncpy_from_user
(
dst
,
src
,
count
);
return
-
EFAULT
;
...
...
@@ -329,6 +336,7 @@ extern int __strnlen_user(const char *str, long len);
*/
static
inline
int
strnlen_user
(
const
char
*
str
,
long
len
)
{
might_sleep
();
if
(
likely
(
access_ok
(
VERIFY_READ
,
str
,
1
)))
return
__strnlen_user
(
str
,
len
);
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment