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
dafb1e82
Commit
dafb1e82
authored
Mar 23, 2003
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Add __copy_from_user checks to emu10k1
parent
a71c8f6c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
sound/oss/emu10k1/cardwo.c
sound/oss/emu10k1/cardwo.c
+8
-4
No files found.
sound/oss/emu10k1/cardwo.c
View file @
dafb1e82
...
@@ -408,14 +408,17 @@ static void copy_block(void **dst, u32 str, u8 *src, u32 len)
...
@@ -408,14 +408,17 @@ static void copy_block(void **dst, u32 str, u8 *src, u32 len)
if
(
len
>
PAGE_SIZE
-
pgoff
)
{
if
(
len
>
PAGE_SIZE
-
pgoff
)
{
k
=
PAGE_SIZE
-
pgoff
;
k
=
PAGE_SIZE
-
pgoff
;
__copy_from_user
((
u8
*
)
dst
[
pg
]
+
pgoff
,
src
,
k
);
if
(
__copy_from_user
((
u8
*
)
dst
[
pg
]
+
pgoff
,
src
,
k
))
return
;
len
-=
k
;
len
-=
k
;
while
(
len
>
PAGE_SIZE
)
{
while
(
len
>
PAGE_SIZE
)
{
__copy_from_user
(
dst
[
++
pg
],
src
+
k
,
PAGE_SIZE
);
if
(
__copy_from_user
(
dst
[
++
pg
],
src
+
k
,
PAGE_SIZE
))
return
;
k
+=
PAGE_SIZE
;
k
+=
PAGE_SIZE
;
len
-=
PAGE_SIZE
;
len
-=
PAGE_SIZE
;
}
}
__copy_from_user
(
dst
[
++
pg
],
src
+
k
,
len
);
if
(
__copy_from_user
(
dst
[
++
pg
],
src
+
k
,
len
))
return
;
}
else
}
else
__copy_from_user
((
u8
*
)
dst
[
pg
]
+
pgoff
,
src
,
len
);
__copy_from_user
((
u8
*
)
dst
[
pg
]
+
pgoff
,
src
,
len
);
...
@@ -440,7 +443,8 @@ static void copy_ilv_block(struct woinst *woinst, u32 str, u8 *src, u32 len)
...
@@ -440,7 +443,8 @@ static void copy_ilv_block(struct woinst *woinst, u32 str, u8 *src, u32 len)
while
(
len
)
{
while
(
len
)
{
for
(
voice_num
=
0
;
voice_num
<
woinst
->
num_voices
;
voice_num
++
)
{
for
(
voice_num
=
0
;
voice_num
<
woinst
->
num_voices
;
voice_num
++
)
{
__copy_from_user
((
u8
*
)(
voice
[
voice_num
].
mem
.
addr
[
pg
])
+
pgoff
,
src
,
woinst
->
format
.
bytespervoicesample
);
if
(
__copy_from_user
((
u8
*
)(
voice
[
voice_num
].
mem
.
addr
[
pg
])
+
pgoff
,
src
,
woinst
->
format
.
bytespervoicesample
))
return
-
EFAULT
;
src
+=
woinst
->
format
.
bytespervoicesample
;
src
+=
woinst
->
format
.
bytespervoicesample
;
}
}
...
...
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