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
Kirill Smelkov
linux
Commits
1ceb3628
Commit
1ceb3628
authored
Jan 02, 2016
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[um] hostaudio: don't open-code memdup_user()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
80f8dccf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
arch/um/drivers/hostaudio_kern.c
arch/um/drivers/hostaudio_kern.c
+3
-7
No files found.
arch/um/drivers/hostaudio_kern.c
View file @
1ceb3628
...
...
@@ -105,13 +105,9 @@ static ssize_t hostaudio_write(struct file *file, const char __user *buffer,
printk
(
KERN_DEBUG
"hostaudio: write called, count = %d
\n
"
,
count
);
#endif
kbuf
=
kmalloc
(
count
,
GFP_KERNEL
);
if
(
kbuf
==
NULL
)
return
-
ENOMEM
;
err
=
-
EFAULT
;
if
(
copy_from_user
(
kbuf
,
buffer
,
count
))
goto
out
;
kbuf
=
memdup_user
(
buffer
,
count
);
if
(
IS_ERR
(
kbuf
))
return
PTR_ERR
(
kbuf
);
err
=
os_write_file
(
state
->
fd
,
kbuf
,
count
);
if
(
err
<
0
)
...
...
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