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
657732b7
Commit
657732b7
authored
Sep 21, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: fix sys32_select race with max_fdset
parent
1ed3b323
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
arch/ppc64/kernel/sys_ppc32.c
arch/ppc64/kernel/sys_ppc32.c
+8
-7
No files found.
arch/ppc64/kernel/sys_ppc32.c
View file @
657732b7
...
...
@@ -213,7 +213,7 @@ asmlinkage long sys32_readv(u32 fd, struct iovec32 *vector, u32 count)
goto
bad_file
;
if
(
file
->
f_op
&&
(
file
->
f_mode
&
FMODE_READ
)
&&
(
file
->
f_op
->
readv
||
file
->
f_op
->
read
))
(
file
->
f_op
->
readv
||
file
->
f_op
->
read
))
ret
=
do_readv_writev32
(
VERIFY_WRITE
,
file
,
vector
,
count
);
fput
(
file
);
...
...
@@ -238,8 +238,6 @@ asmlinkage long sys32_writev(u32 fd, struct iovec32 *vector, u32 count)
return
ret
;
}
static
inline
int
get_flock
(
struct
flock
*
kfl
,
struct
flock32
*
ufl
)
{
int
err
;
...
...
@@ -656,8 +654,8 @@ asmlinkage long sys32_select(int n, u32 *inp, u32 *outp, u32 *exp, u32 tvp_x)
char
*
bits
;
unsigned
long
nn
;
long
timeout
;
int
ret
,
size
;
int
ret
,
size
,
max_fdset
;
timeout
=
MAX_SCHEDULE_TIMEOUT
;
if
(
tvp
)
{
time_t
sec
,
usec
;
...
...
@@ -679,8 +677,11 @@ asmlinkage long sys32_select(int n, u32 *inp, u32 *outp, u32 *exp, u32 tvp_x)
ret
=
-
EINVAL
;
if
(
n
<
0
)
goto
out_nofds
;
if
(
n
>
current
->
files
->
max_fdset
)
n
=
current
->
files
->
max_fdset
;
/* max_fdset can increase, so grab it once to avoid race */
max_fdset
=
current
->
files
->
max_fdset
;
if
(
n
>
max_fdset
)
n
=
max_fdset
;
/*
* We need 6 bitmaps (in/out/ex for both incoming and outgoing),
...
...
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