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
nexedi
linux
Commits
a6a7f31b
Commit
a6a7f31b
authored
Apr 09, 2003
by
Linus Torvalds
Committed by
Linus Torvalds
Apr 09, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add user pointer annotations to fs/select.c
parent
064d7c46
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
fs/select.c
fs/select.c
+2
-2
include/linux/poll.h
include/linux/poll.h
+2
-2
No files found.
fs/select.c
View file @
a6a7f31b
...
@@ -268,7 +268,7 @@ static void select_bits_free(void *bits, int size)
...
@@ -268,7 +268,7 @@ static void select_bits_free(void *bits, int size)
((unsigned long) (MAX_SCHEDULE_TIMEOUT / HZ)-1)
((unsigned long) (MAX_SCHEDULE_TIMEOUT / HZ)-1)
asmlinkage
long
asmlinkage
long
sys_select
(
int
n
,
fd_set
*
inp
,
fd_set
*
outp
,
fd_set
*
exp
,
struct
timeval
*
tvp
)
sys_select
(
int
n
,
fd_set
__user
*
inp
,
fd_set
__user
*
outp
,
fd_set
__user
*
exp
,
struct
timeval
__user
*
tvp
)
{
{
fd_set_bits
fds
;
fd_set_bits
fds
;
char
*
bits
;
char
*
bits
;
...
@@ -429,7 +429,7 @@ static int do_poll(unsigned int nfds, struct poll_list *list,
...
@@ -429,7 +429,7 @@ static int do_poll(unsigned int nfds, struct poll_list *list,
return
count
;
return
count
;
}
}
asmlinkage
long
sys_poll
(
struct
pollfd
*
ufds
,
unsigned
int
nfds
,
long
timeout
)
asmlinkage
long
sys_poll
(
struct
pollfd
__user
*
ufds
,
unsigned
int
nfds
,
long
timeout
)
{
{
struct
poll_wqueues
table
;
struct
poll_wqueues
table
;
int
fdcount
,
err
;
int
fdcount
,
err
;
...
...
include/linux/poll.h
View file @
a6a7f31b
...
@@ -67,7 +67,7 @@ typedef struct {
...
@@ -67,7 +67,7 @@ typedef struct {
* Use "unsigned long" accesses to let user-mode fd_set's be long-aligned.
* Use "unsigned long" accesses to let user-mode fd_set's be long-aligned.
*/
*/
static
inline
static
inline
int
get_fd_set
(
unsigned
long
nr
,
void
*
ufdset
,
unsigned
long
*
fdset
)
int
get_fd_set
(
unsigned
long
nr
,
void
__user
*
ufdset
,
unsigned
long
*
fdset
)
{
{
nr
=
FDS_BYTES
(
nr
);
nr
=
FDS_BYTES
(
nr
);
if
(
ufdset
)
{
if
(
ufdset
)
{
...
@@ -82,7 +82,7 @@ int get_fd_set(unsigned long nr, void *ufdset, unsigned long *fdset)
...
@@ -82,7 +82,7 @@ int get_fd_set(unsigned long nr, void *ufdset, unsigned long *fdset)
}
}
static
inline
static
inline
void
set_fd_set
(
unsigned
long
nr
,
void
*
ufdset
,
unsigned
long
*
fdset
)
void
set_fd_set
(
unsigned
long
nr
,
void
__user
*
ufdset
,
unsigned
long
*
fdset
)
{
{
if
(
ufdset
)
if
(
ufdset
)
__copy_to_user
(
ufdset
,
fdset
,
FDS_BYTES
(
nr
));
__copy_to_user
(
ufdset
,
fdset
,
FDS_BYTES
(
nr
));
...
...
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