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
0c1821db
Commit
0c1821db
authored
Jan 02, 2003
by
Stephen Rothwell
Committed by
David S. Miller
Jan 02, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] compat_flock: x86_64
parent
c8e9f940
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
36 deletions
+10
-36
arch/x86_64/ia32/sys_ia32.c
arch/x86_64/ia32/sys_ia32.c
+2
-26
include/asm-x86_64/compat.h
include/asm-x86_64/compat.h
+8
-0
include/asm-x86_64/ia32.h
include/asm-x86_64/ia32.h
+0
-10
No files found.
arch/x86_64/ia32/sys_ia32.c
View file @
0c1821db
...
...
@@ -1066,30 +1066,6 @@ sys32_getrusage(int who, struct rusage32 *ru)
return
ret
;
}
static
inline
int
get_flock
(
struct
flock
*
kfl
,
struct
flock32
*
ufl
)
{
int
err
;
err
=
get_user
(
kfl
->
l_type
,
&
ufl
->
l_type
);
err
|=
__get_user
(
kfl
->
l_whence
,
&
ufl
->
l_whence
);
err
|=
__get_user
(
kfl
->
l_start
,
&
ufl
->
l_start
);
err
|=
__get_user
(
kfl
->
l_len
,
&
ufl
->
l_len
);
err
|=
__get_user
(
kfl
->
l_pid
,
&
ufl
->
l_pid
);
return
err
;
}
static
inline
int
put_flock
(
struct
flock
*
kfl
,
struct
flock32
*
ufl
)
{
int
err
;
err
=
__put_user
(
kfl
->
l_type
,
&
ufl
->
l_type
);
err
|=
__put_user
(
kfl
->
l_whence
,
&
ufl
->
l_whence
);
err
|=
__put_user
(
kfl
->
l_start
,
&
ufl
->
l_start
);
err
|=
__put_user
(
kfl
->
l_len
,
&
ufl
->
l_len
);
err
|=
__put_user
(
kfl
->
l_pid
,
&
ufl
->
l_pid
);
return
err
;
}
extern
asmlinkage
long
sys_fcntl
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
);
asmlinkage
long
sys32_fcntl64
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
);
...
...
@@ -1105,13 +1081,13 @@ asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg
mm_segment_t
old_fs
;
long
ret
;
if
(
get_
flock
(
&
f
,
(
struct
flock32
*
)
arg
))
if
(
get_
compat_flock
(
&
f
,
(
struct
compat_flock
*
)
arg
))
return
-
EFAULT
;
old_fs
=
get_fs
();
set_fs
(
KERNEL_DS
);
ret
=
sys_fcntl
(
fd
,
cmd
,
(
unsigned
long
)
&
f
);
set_fs
(
old_fs
);
if
(
ret
)
return
ret
;
if
(
put_
flock
(
&
f
,
(
struct
flock32
*
)
arg
))
if
(
put_
compat_flock
(
&
f
,
(
struct
compat_flock
*
)
arg
))
return
-
EFAULT
;
return
0
;
}
...
...
include/asm-x86_64/compat.h
View file @
0c1821db
...
...
@@ -54,4 +54,12 @@ struct compat_stat {
u32
__unused5
;
};
struct
compat_flock
{
short
l_type
;
short
l_whence
;
compat_off_t
l_start
;
compat_off_t
l_len
;
compat_pid_t
l_pid
;
};
#endif
/* _ASM_X86_64_COMPAT_H */
include/asm-x86_64/ia32.h
View file @
0c1821db
...
...
@@ -22,16 +22,6 @@ typedef long __kernel_loff_t32;
typedef
__kernel_fsid_t
__kernel_fsid_t32
;
/* fcntl.h */
struct
flock32
{
short
l_type
;
short
l_whence
;
compat_off_t
l_start
;
compat_off_t
l_len
;
compat_pid_t
l_pid
;
};
struct
ia32_flock64
{
short
l_type
;
short
l_whence
;
...
...
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