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
282312b0
Commit
282312b0
authored
Jul 11, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge nuts.ninka.net:/home/davem/src/BK/sparcwork-2.5
into nuts.ninka.net:/home/davem/src/BK/sparc-2.5
parents
51544df2
c79a3654
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
6 deletions
+32
-6
arch/sparc/kernel/sys_sparc.c
arch/sparc/kernel/sys_sparc.c
+4
-1
arch/sparc64/kernel/sys_sparc.c
arch/sparc64/kernel/sys_sparc.c
+4
-1
arch/sparc64/kernel/sys_sparc32.c
arch/sparc64/kernel/sys_sparc32.c
+22
-4
include/asm-sparc/ipc.h
include/asm-sparc/ipc.h
+1
-0
include/asm-sparc64/ipc.h
include/asm-sparc64/ipc.h
+1
-0
No files found.
arch/sparc/kernel/sys_sparc.c
View file @
282312b0
...
@@ -123,7 +123,10 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void __user
...
@@ -123,7 +123,10 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void __user
if
(
call
<=
SEMCTL
)
if
(
call
<=
SEMCTL
)
switch
(
call
)
{
switch
(
call
)
{
case
SEMOP
:
case
SEMOP
:
err
=
sys_semop
(
first
,
(
struct
sembuf
__user
*
)
ptr
,
second
);
err
=
sys_semtimedop
(
first
,
(
struct
sembuf
__user
*
)
ptr
,
second
,
NULL
);
goto
out
;
case
SEMTIMEDOP
:
err
=
sys_semtimedop
(
first
,
(
struct
sembuf
__user
*
)
ptr
,
second
,
(
const
struct
timespec
__user
*
)
fifth
);
goto
out
;
goto
out
;
case
SEMGET
:
case
SEMGET
:
err
=
sys_semget
(
first
,
second
,
third
);
err
=
sys_semget
(
first
,
second
,
third
);
...
...
arch/sparc64/kernel/sys_sparc.c
View file @
282312b0
...
@@ -182,7 +182,10 @@ asmlinkage int sys_ipc (unsigned call, int first, int second, unsigned long thir
...
@@ -182,7 +182,10 @@ asmlinkage int sys_ipc (unsigned call, int first, int second, unsigned long thir
if
(
call
<=
SEMCTL
)
if
(
call
<=
SEMCTL
)
switch
(
call
)
{
switch
(
call
)
{
case
SEMOP
:
case
SEMOP
:
err
=
sys_semop
(
first
,
(
struct
sembuf
*
)
ptr
,
second
);
err
=
sys_semtimedop
(
first
,
(
struct
sembuf
*
)
ptr
,
second
,
NULL
);
goto
out
;
case
SEMTIMEDOP
:
err
=
sys_semtimedop
(
first
,
(
struct
sembuf
*
)
ptr
,
second
,
(
const
struct
timespec
*
)
fifth
);
goto
out
;
goto
out
;
case
SEMGET
:
case
SEMGET
:
err
=
sys_semget
(
first
,
second
,
(
int
)
third
);
err
=
sys_semget
(
first
,
second
,
(
int
)
third
);
...
...
arch/sparc64/kernel/sys_sparc32.c
View file @
282312b0
...
@@ -480,7 +480,7 @@ static int do_sys32_semctl(int first, int second, int third, void *uptr)
...
@@ -480,7 +480,7 @@ static int do_sys32_semctl(int first, int second, int third, void *uptr)
static
int
do_sys32_msgsnd
(
int
first
,
int
second
,
int
third
,
void
*
uptr
)
static
int
do_sys32_msgsnd
(
int
first
,
int
second
,
int
third
,
void
*
uptr
)
{
{
struct
msgbuf
*
p
=
kmalloc
(
second
+
sizeof
(
struct
msgbuf
)
+
4
,
GFP_USER
);
struct
msgbuf
*
p
=
kmalloc
(
second
+
sizeof
(
struct
msgbuf
),
GFP_USER
);
struct
msgbuf32
*
up
=
(
struct
msgbuf32
*
)
uptr
;
struct
msgbuf32
*
up
=
(
struct
msgbuf32
*
)
uptr
;
mm_segment_t
old_fs
;
mm_segment_t
old_fs
;
int
err
;
int
err
;
...
@@ -522,12 +522,12 @@ static int do_sys32_msgrcv (int first, int second, int msgtyp, int third,
...
@@ -522,12 +522,12 @@ static int do_sys32_msgrcv (int first, int second, int msgtyp, int third,
msgtyp
=
ipck
.
msgtyp
;
msgtyp
=
ipck
.
msgtyp
;
}
}
err
=
-
ENOMEM
;
err
=
-
ENOMEM
;
p
=
kmalloc
(
second
+
sizeof
(
struct
msgbuf
)
+
4
,
GFP_USER
);
p
=
kmalloc
(
second
+
sizeof
(
struct
msgbuf
),
GFP_USER
);
if
(
!
p
)
if
(
!
p
)
goto
out
;
goto
out
;
old_fs
=
get_fs
();
old_fs
=
get_fs
();
set_fs
(
KERNEL_DS
);
set_fs
(
KERNEL_DS
);
err
=
sys_msgrcv
(
first
,
p
,
second
+
4
,
msgtyp
,
third
);
err
=
sys_msgrcv
(
first
,
p
,
second
,
msgtyp
,
third
);
set_fs
(
old_fs
);
set_fs
(
old_fs
);
if
(
err
<
0
)
if
(
err
<
0
)
goto
free_then_out
;
goto
free_then_out
;
...
@@ -736,6 +736,22 @@ static int do_sys32_shmctl (int first, int second, void *uptr)
...
@@ -736,6 +736,22 @@ static int do_sys32_shmctl (int first, int second, void *uptr)
return
err
;
return
err
;
}
}
static
int
sys32_semtimedop
(
int
semid
,
struct
sembuf
*
tsems
,
int
nsems
,
const
struct
compat_timespec
*
timeout32
)
{
struct
compat_timespec
t32
;
struct
timespec
*
t64
=
compat_alloc_user_space
(
sizeof
(
*
t64
));
if
(
copy_from_user
(
&
t32
,
timeout32
,
sizeof
(
t32
)))
return
-
EFAULT
;
if
(
put_user
(
t32
.
tv_sec
,
&
t64
->
tv_sec
)
||
put_user
(
t32
.
tv_nsec
,
&
t64
->
tv_nsec
))
return
-
EFAULT
;
return
sys_semtimedop
(
semid
,
tsems
,
nsems
,
t64
);
}
asmlinkage
int
sys32_ipc
(
u32
call
,
int
first
,
int
second
,
int
third
,
u32
ptr
,
u32
fifth
)
asmlinkage
int
sys32_ipc
(
u32
call
,
int
first
,
int
second
,
int
third
,
u32
ptr
,
u32
fifth
)
{
{
int
version
,
err
;
int
version
,
err
;
...
@@ -747,8 +763,10 @@ asmlinkage int sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u
...
@@ -747,8 +763,10 @@ asmlinkage int sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u
switch
(
call
)
{
switch
(
call
)
{
case
SEMOP
:
case
SEMOP
:
/* struct sembuf is the same on 32 and 64bit :)) */
/* struct sembuf is the same on 32 and 64bit :)) */
err
=
sys_sem
op
(
first
,
(
struct
sembuf
*
)
AA
(
ptr
),
second
);
err
=
sys_sem
timedop
(
first
,
(
struct
sembuf
*
)
AA
(
ptr
),
second
,
NULL
);
goto
out
;
goto
out
;
case
SEMTIMEDOP
:
err
=
sys32_semtimedop
(
first
,
(
struct
sembuf
*
)
AA
(
ptr
),
second
,
(
const
struct
compat_timespec
*
)
AA
(
fifth
));
case
SEMGET
:
case
SEMGET
:
err
=
sys_semget
(
first
,
second
,
third
);
err
=
sys_semget
(
first
,
second
,
third
);
goto
out
;
goto
out
;
...
...
include/asm-sparc/ipc.h
View file @
282312b0
...
@@ -14,6 +14,7 @@ struct ipc_kludge {
...
@@ -14,6 +14,7 @@ struct ipc_kludge {
#define SEMOP 1
#define SEMOP 1
#define SEMGET 2
#define SEMGET 2
#define SEMCTL 3
#define SEMCTL 3
#define SEMTIMEDOP 4
#define MSGSND 11
#define MSGSND 11
#define MSGRCV 12
#define MSGRCV 12
#define MSGGET 13
#define MSGGET 13
...
...
include/asm-sparc64/ipc.h
View file @
282312b0
...
@@ -14,6 +14,7 @@ struct ipc_kludge {
...
@@ -14,6 +14,7 @@ struct ipc_kludge {
#define SEMOP 1
#define SEMOP 1
#define SEMGET 2
#define SEMGET 2
#define SEMCTL 3
#define SEMCTL 3
#define SEMTIMEDOP 4
#define MSGSND 11
#define MSGSND 11
#define MSGRCV 12
#define MSGRCV 12
#define MSGGET 13
#define MSGGET 13
...
...
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