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
793b796e
Commit
793b796e
authored
Jan 02, 2016
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[um] mconsole: don't open-code memdup_user_nul()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
1ceb3628
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
arch/um/drivers/mconsole_kern.c
arch/um/drivers/mconsole_kern.c
+3
-11
No files found.
arch/um/drivers/mconsole_kern.c
View file @
793b796e
...
...
@@ -748,19 +748,11 @@ static ssize_t mconsole_proc_write(struct file *file,
{
char
*
buf
;
buf
=
kmalloc
(
count
+
1
,
GFP_KERNEL
);
if
(
buf
==
NULL
)
return
-
ENOMEM
;
if
(
copy_from_user
(
buf
,
buffer
,
count
))
{
count
=
-
EFAULT
;
goto
out
;
}
buf
[
count
]
=
'\0'
;
buf
=
memdup_user_nul
(
buffer
,
count
);
if
(
IS_ERR
(
buf
))
return
PTR_ERR
(
buf
);
mconsole_notify
(
notify_socket
,
MCONSOLE_USER_NOTIFY
,
buf
,
count
);
out:
kfree
(
buf
);
return
count
;
}
...
...
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