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
7659751a
Commit
7659751a
authored
Nov 13, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[COMPAT]: Fix arguments to compat statfs64 syscalls, 'sz' was missing.
parent
c85d8ef9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
fs/compat.c
fs/compat.c
+8
-3
No files found.
fs/compat.c
View file @
7659751a
...
@@ -169,7 +169,6 @@ asmlinkage long compat_sys_fstatfs(unsigned int fd, struct compat_statfs *buf)
...
@@ -169,7 +169,6 @@ asmlinkage long compat_sys_fstatfs(unsigned int fd, struct compat_statfs *buf)
static
int
put_compat_statfs64
(
struct
compat_statfs64
*
ubuf
,
struct
kstatfs
*
kbuf
)
static
int
put_compat_statfs64
(
struct
compat_statfs64
*
ubuf
,
struct
kstatfs
*
kbuf
)
{
{
if
(
sizeof
ubuf
->
f_blocks
==
4
)
{
if
(
sizeof
ubuf
->
f_blocks
==
4
)
{
if
((
kbuf
->
f_blocks
|
kbuf
->
f_bfree
|
if
((
kbuf
->
f_blocks
|
kbuf
->
f_bfree
|
kbuf
->
f_bavail
|
kbuf
->
f_files
|
kbuf
->
f_ffree
)
&
kbuf
->
f_bavail
|
kbuf
->
f_files
|
kbuf
->
f_ffree
)
&
...
@@ -192,11 +191,14 @@ static int put_compat_statfs64(struct compat_statfs64 *ubuf, struct kstatfs *kbu
...
@@ -192,11 +191,14 @@ static int put_compat_statfs64(struct compat_statfs64 *ubuf, struct kstatfs *kbu
return
0
;
return
0
;
}
}
asmlinkage
long
compat_statfs64
(
const
char
*
path
,
struct
compat_statfs64
*
buf
)
asmlinkage
long
compat_statfs64
(
const
char
*
path
,
compat_size_t
sz
,
struct
compat_statfs64
*
buf
)
{
{
struct
nameidata
nd
;
struct
nameidata
nd
;
int
error
;
int
error
;
if
(
sz
!=
sizeof
(
*
buf
))
return
-
EINVAL
;
error
=
user_path_walk
(
path
,
&
nd
);
error
=
user_path_walk
(
path
,
&
nd
);
if
(
!
error
)
{
if
(
!
error
)
{
struct
kstatfs
tmp
;
struct
kstatfs
tmp
;
...
@@ -208,12 +210,15 @@ asmlinkage long compat_statfs64(const char *path, struct compat_statfs64 *buf)
...
@@ -208,12 +210,15 @@ asmlinkage long compat_statfs64(const char *path, struct compat_statfs64 *buf)
return
error
;
return
error
;
}
}
asmlinkage
long
compat_fstatfs64
(
unsigned
int
fd
,
struct
compat_statfs64
*
buf
)
asmlinkage
long
compat_fstatfs64
(
unsigned
int
fd
,
compat_size_t
sz
,
struct
compat_statfs64
*
buf
)
{
{
struct
file
*
file
;
struct
file
*
file
;
struct
kstatfs
tmp
;
struct
kstatfs
tmp
;
int
error
;
int
error
;
if
(
sz
!=
sizeof
(
*
buf
))
return
-
EINVAL
;
error
=
-
EBADF
;
error
=
-
EBADF
;
file
=
fget
(
fd
);
file
=
fget
(
fd
);
if
(
!
file
)
if
(
!
file
)
...
...
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