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
2622cf1d
Commit
2622cf1d
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: s390x
parent
db3da180
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
36 deletions
+12
-36
arch/s390x/kernel/linux32.c
arch/s390x/kernel/linux32.c
+3
-27
arch/s390x/kernel/linux32.h
arch/s390x/kernel/linux32.h
+0
-9
include/asm-s390x/compat.h
include/asm-s390x/compat.h
+9
-0
No files found.
arch/s390x/kernel/linux32.c
View file @
2622cf1d
...
...
@@ -833,30 +833,6 @@ asmlinkage int sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u
return
err
;
}
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_fcntl
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
...
...
@@ -868,7 +844,7 @@ 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
*
)
A
(
arg
)))
if
(
get_
compat_flock
(
&
f
,
(
struct
compat_flock
*
)
A
(
arg
)))
return
-
EFAULT
;
old_fs
=
get_fs
();
set_fs
(
KERNEL_DS
);
ret
=
sys_fcntl
(
fd
,
cmd
,
(
unsigned
long
)
&
f
);
...
...
@@ -877,7 +853,7 @@ asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg
if
(
f
.
l_start
>=
0x7fffffffUL
||
f
.
l_start
+
f
.
l_len
>=
0x7fffffffUL
)
return
-
EOVERFLOW
;
if
(
put_
flock
(
&
f
,
(
struct
flock32
*
)
A
(
arg
)))
if
(
put_
compat_flock
(
&
f
,
(
struct
compat_flock
*
)
A
(
arg
)))
return
-
EFAULT
;
return
0
;
}
...
...
@@ -888,7 +864,7 @@ 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
*
)
A
(
arg
)))
if
(
get_
compat_flock
(
&
f
,
(
struct
compat_flock
*
)
A
(
arg
)))
return
-
EFAULT
;
old_fs
=
get_fs
();
set_fs
(
KERNEL_DS
);
ret
=
sys_fcntl
(
fd
,
cmd
,
(
unsigned
long
)
&
f
);
...
...
arch/s390x/kernel/linux32.h
View file @
2622cf1d
...
...
@@ -25,15 +25,6 @@ struct ipc_kludge_32 {
#define F_SETLK64 13
#define F_SETLKW64 14
struct
flock32
{
short
l_type
;
short
l_whence
;
compat_off_t
l_start
;
compat_off_t
l_len
;
compat_pid_t
l_pid
;
short
__unused
;
};
struct
statfs32
{
__s32
f_type
;
__s32
f_bsize
;
...
...
include/asm-s390x/compat.h
View file @
2622cf1d
...
...
@@ -58,4 +58,13 @@ 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
;
short
__unused
;
};
#endif
/* _ASM_S390X_COMPAT_H */
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