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
75a8032a
Commit
75a8032a
authored
Mar 25, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Fix lvalue casting in sys_sparc32.c
parent
14c27430
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
arch/sparc64/kernel/sys_sparc32.c
arch/sparc64/kernel/sys_sparc32.c
+12
-5
No files found.
arch/sparc64/kernel/sys_sparc32.c
View file @
75a8032a
...
@@ -1104,7 +1104,7 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset, i
...
@@ -1104,7 +1104,7 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset, i
copy_to_user
(
dirent
->
d_name
,
name
,
namlen
);
copy_to_user
(
dirent
->
d_name
,
name
,
namlen
);
put_user
(
0
,
dirent
->
d_name
+
namlen
);
put_user
(
0
,
dirent
->
d_name
+
namlen
);
put_user
(
d_type
,
(
char
*
)
dirent
+
reclen
-
1
);
put_user
(
d_type
,
(
char
*
)
dirent
+
reclen
-
1
);
((
char
*
)
dirent
)
+=
reclen
;
dirent
=
(
void
*
)
dirent
+
reclen
;
buf
->
current_dir
=
dirent
;
buf
->
current_dir
=
dirent
;
buf
->
count
-=
reclen
;
buf
->
count
-=
reclen
;
return
0
;
return
0
;
...
@@ -1781,9 +1781,12 @@ asmlinkage int sys32_sigaction (int sig, struct old_sigaction32 *act, struct old
...
@@ -1781,9 +1781,12 @@ asmlinkage int sys32_sigaction (int sig, struct old_sigaction32 *act, struct old
if
(
act
)
{
if
(
act
)
{
compat_old_sigset_t
mask
;
compat_old_sigset_t
mask
;
u32
u_handler
,
u_restorer
;
ret
=
get_user
((
long
)
new_ka
.
sa
.
sa_handler
,
&
act
->
sa_handler
);
ret
=
get_user
(
u_handler
,
&
act
->
sa_handler
);
ret
|=
__get_user
((
long
)
new_ka
.
sa
.
sa_restorer
,
&
act
->
sa_restorer
);
new_ka
.
sa
.
sa_handler
=
(
void
*
)
(
long
)
u_handler
;
ret
|=
__get_user
(
u_restorer
,
&
act
->
sa_restorer
);
new_ka
.
sa
.
sa_restorer
=
(
void
*
)
(
long
)
u_restorer
;
ret
|=
__get_user
(
new_ka
.
sa
.
sa_flags
,
&
act
->
sa_flags
);
ret
|=
__get_user
(
new_ka
.
sa
.
sa_flags
,
&
act
->
sa_flags
);
ret
|=
__get_user
(
mask
,
&
act
->
sa_mask
);
ret
|=
__get_user
(
mask
,
&
act
->
sa_mask
);
if
(
ret
)
if
(
ret
)
...
@@ -1822,8 +1825,11 @@ sys32_rt_sigaction(int sig, struct sigaction32 *act, struct sigaction32 *oact,
...
@@ -1822,8 +1825,11 @@ sys32_rt_sigaction(int sig, struct sigaction32 *act, struct sigaction32 *oact,
set_thread_flag
(
TIF_NEWSIGNALS
);
set_thread_flag
(
TIF_NEWSIGNALS
);
if
(
act
)
{
if
(
act
)
{
u32
u_handler
,
u_restorer
;
new_ka
.
ka_restorer
=
restorer
;
new_ka
.
ka_restorer
=
restorer
;
ret
=
get_user
((
long
)
new_ka
.
sa
.
sa_handler
,
&
act
->
sa_handler
);
ret
=
get_user
(
u_handler
,
&
act
->
sa_handler
);
new_ka
.
sa
.
sa_handler
=
(
void
*
)
(
long
)
u_handler
;
ret
|=
__copy_from_user
(
&
set32
,
&
act
->
sa_mask
,
sizeof
(
compat_sigset_t
));
ret
|=
__copy_from_user
(
&
set32
,
&
act
->
sa_mask
,
sizeof
(
compat_sigset_t
));
switch
(
_NSIG_WORDS
)
{
switch
(
_NSIG_WORDS
)
{
case
4
:
new_ka
.
sa
.
sa_mask
.
sig
[
3
]
=
set32
.
sig
[
6
]
|
(((
long
)
set32
.
sig
[
7
])
<<
32
);
case
4
:
new_ka
.
sa
.
sa_mask
.
sig
[
3
]
=
set32
.
sig
[
6
]
|
(((
long
)
set32
.
sig
[
7
])
<<
32
);
...
@@ -1832,7 +1838,8 @@ sys32_rt_sigaction(int sig, struct sigaction32 *act, struct sigaction32 *oact,
...
@@ -1832,7 +1838,8 @@ sys32_rt_sigaction(int sig, struct sigaction32 *act, struct sigaction32 *oact,
case
1
:
new_ka
.
sa
.
sa_mask
.
sig
[
0
]
=
set32
.
sig
[
0
]
|
(((
long
)
set32
.
sig
[
1
])
<<
32
);
case
1
:
new_ka
.
sa
.
sa_mask
.
sig
[
0
]
=
set32
.
sig
[
0
]
|
(((
long
)
set32
.
sig
[
1
])
<<
32
);
}
}
ret
|=
__get_user
(
new_ka
.
sa
.
sa_flags
,
&
act
->
sa_flags
);
ret
|=
__get_user
(
new_ka
.
sa
.
sa_flags
,
&
act
->
sa_flags
);
ret
|=
__get_user
((
long
)
new_ka
.
sa
.
sa_restorer
,
&
act
->
sa_restorer
);
ret
|=
__get_user
(
u_restorer
,
&
act
->
sa_restorer
);
new_ka
.
sa
.
sa_restorer
=
(
void
*
)
(
long
)
u_restorer
;
if
(
ret
)
if
(
ret
)
return
-
EFAULT
;
return
-
EFAULT
;
}
}
...
...
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