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
d34bd869
Commit
d34bd869
authored
Sep 20, 2004
by
Richard Henderson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ALPHA] Add __user as necessary to fix sparse warnings.
parent
7c91bb87
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
38 deletions
+39
-38
arch/alpha/kernel/osf_sys.c
arch/alpha/kernel/osf_sys.c
+36
-35
arch/alpha/kernel/srmcons.c
arch/alpha/kernel/srmcons.c
+1
-1
arch/alpha/kernel/traps.c
arch/alpha/kernel/traps.c
+1
-1
arch/alpha/mm/fault.c
arch/alpha/mm/fault.c
+1
-1
No files found.
arch/alpha/kernel/osf_sys.c
View file @
d34bd869
...
...
@@ -1110,46 +1110,47 @@ osf_getrusage(int who, struct rusage32 __user *ru)
return
copy_to_user
(
ru
,
&
r
,
sizeof
(
r
))
?
-
EFAULT
:
0
;
}
asmlinkage
int
osf_wait4
(
pid_t
pid
,
int
__user
*
ustatus
,
int
options
,
struct
rusage32
__user
*
ur
)
asmlinkage
long
osf_wait4
(
pid_t
pid
,
int
__user
*
ustatus
,
int
options
,
struct
rusage32
__user
*
ur
)
{
if
(
!
ur
)
{
struct
rusage
r
;
long
ret
,
err
;
mm_segment_t
old_fs
;
if
(
!
ur
)
return
sys_wait4
(
pid
,
ustatus
,
options
,
NULL
);
}
else
{
struct
rusage
r
;
int
ret
,
status
;
mm_segment_t
old_fs
=
get_fs
();
old_fs
=
get_fs
();
set_fs
(
KERNEL_DS
);
ret
=
sys_wait4
(
pid
,
&
status
,
options
,
&
r
);
set_fs
(
old_fs
);
set_fs
(
KERNEL_DS
);
ret
=
sys_wait4
(
pid
,
ustatus
,
options
,
(
struct
rusage
__user
*
)
&
r
);
set_fs
(
old_fs
);
if
(
!
access_ok
(
VERIFY_WRITE
,
ur
,
sizeof
(
*
ur
)))
return
-
EFAULT
;
__put_user
(
r
.
ru_utime
.
tv_sec
,
&
ur
->
ru_utime
.
tv_sec
);
__put_user
(
r
.
ru_utime
.
tv_usec
,
&
ur
->
ru_utime
.
tv_usec
);
__put_user
(
r
.
ru_stime
.
tv_sec
,
&
ur
->
ru_stime
.
tv_sec
);
__put_user
(
r
.
ru_stime
.
tv_usec
,
&
ur
->
ru_stime
.
tv_usec
);
__put_user
(
r
.
ru_maxrss
,
&
ur
->
ru_maxrss
);
__put_user
(
r
.
ru_ixrss
,
&
ur
->
ru_ixrss
);
__put_user
(
r
.
ru_idrss
,
&
ur
->
ru_idrss
);
__put_user
(
r
.
ru_isrss
,
&
ur
->
ru_isrss
);
__put_user
(
r
.
ru_minflt
,
&
ur
->
ru_minflt
);
__put_user
(
r
.
ru_majflt
,
&
ur
->
ru_majflt
);
__put_user
(
r
.
ru_nswap
,
&
ur
->
ru_nswap
);
__put_user
(
r
.
ru_inblock
,
&
ur
->
ru_inblock
);
__put_user
(
r
.
ru_oublock
,
&
ur
->
ru_oublock
);
__put_user
(
r
.
ru_msgsnd
,
&
ur
->
ru_msgsnd
);
__put_user
(
r
.
ru_msgrcv
,
&
ur
->
ru_msgrcv
);
__put_user
(
r
.
ru_nsignals
,
&
ur
->
ru_nsignals
);
__put_user
(
r
.
ru_nvcsw
,
&
ur
->
ru_nvcsw
);
if
(
__put_user
(
r
.
ru_nivcsw
,
&
ur
->
ru_nivcsw
))
return
-
EFAULT
;
if
(
!
access_ok
(
VERIFY_WRITE
,
ur
,
sizeof
(
*
ur
)))
return
-
EFAULT
;
if
(
ustatus
&&
put_user
(
status
,
ustatus
))
return
-
EFAULT
;
return
ret
;
}
err
=
0
;
err
|=
__put_user
(
r
.
ru_utime
.
tv_sec
,
&
ur
->
ru_utime
.
tv_sec
);
err
|=
__put_user
(
r
.
ru_utime
.
tv_usec
,
&
ur
->
ru_utime
.
tv_usec
);
err
|=
__put_user
(
r
.
ru_stime
.
tv_sec
,
&
ur
->
ru_stime
.
tv_sec
);
err
|=
__put_user
(
r
.
ru_stime
.
tv_usec
,
&
ur
->
ru_stime
.
tv_usec
);
err
|=
__put_user
(
r
.
ru_maxrss
,
&
ur
->
ru_maxrss
);
err
|=
__put_user
(
r
.
ru_ixrss
,
&
ur
->
ru_ixrss
);
err
|=
__put_user
(
r
.
ru_idrss
,
&
ur
->
ru_idrss
);
err
|=
__put_user
(
r
.
ru_isrss
,
&
ur
->
ru_isrss
);
err
|=
__put_user
(
r
.
ru_minflt
,
&
ur
->
ru_minflt
);
err
|=
__put_user
(
r
.
ru_majflt
,
&
ur
->
ru_majflt
);
err
|=
__put_user
(
r
.
ru_nswap
,
&
ur
->
ru_nswap
);
err
|=
__put_user
(
r
.
ru_inblock
,
&
ur
->
ru_inblock
);
err
|=
__put_user
(
r
.
ru_oublock
,
&
ur
->
ru_oublock
);
err
|=
__put_user
(
r
.
ru_msgsnd
,
&
ur
->
ru_msgsnd
);
err
|=
__put_user
(
r
.
ru_msgrcv
,
&
ur
->
ru_msgrcv
);
err
|=
__put_user
(
r
.
ru_nsignals
,
&
ur
->
ru_nsignals
);
err
|=
__put_user
(
r
.
ru_nvcsw
,
&
ur
->
ru_nvcsw
);
err
|=
__put_user
(
r
.
ru_nivcsw
,
&
ur
->
ru_nivcsw
);
return
err
?
err
:
ret
;
}
/*
...
...
arch/alpha/kernel/srmcons.c
View file @
d34bd869
...
...
@@ -146,7 +146,7 @@ srmcons_write(struct tty_struct *tty, int from_user,
if
(
c
>
sizeof
(
tmp
))
c
=
sizeof
(
tmp
);
c
-=
copy_from_user
(
tmp
,
buf
,
c
);
c
-=
copy_from_user
(
tmp
,
(
const
char
__user
*
)
buf
,
c
);
if
(
!
c
)
{
printk
(
"%s: EFAULT (count %d)
\n
"
,
...
...
arch/alpha/kernel/traps.c
View file @
d34bd869
...
...
@@ -111,7 +111,7 @@ dik_show_code(unsigned int *pc)
printk
(
"Code:"
);
for
(
i
=
-
6
;
i
<
2
;
i
++
)
{
unsigned
int
insn
;
if
(
__get_user
(
insn
,
pc
+
i
))
if
(
__get_user
(
insn
,
(
unsigned
int
__user
*
)
pc
+
i
))
break
;
printk
(
"%c%08x%c"
,
i
?
' '
:
'<'
,
insn
,
i
?
' '
:
'>'
);
}
...
...
arch/alpha/mm/fault.c
View file @
d34bd869
...
...
@@ -98,7 +98,7 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
by ignoring such an instruction. */
if
(
cause
==
0
)
{
unsigned
int
insn
;
__get_user
(
insn
,
(
unsigned
int
*
)
regs
->
pc
);
__get_user
(
insn
,
(
unsigned
int
__user
*
)
regs
->
pc
);
if
((
insn
>>
21
&
0x1f
)
==
0x1f
&&
/* ldq ldl ldt lds ldg ldf ldwu ldbu */
(
1ul
<<
(
insn
>>
26
)
&
0x30f00001400ul
))
{
...
...
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