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
abb0f6a7
Commit
abb0f6a7
authored
Jan 02, 2016
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cdrom: don't open-code memdup_user()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
820351f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
drivers/cdrom/cdrom.c
drivers/cdrom/cdrom.c
+3
-7
No files found.
drivers/cdrom/cdrom.c
View file @
abb0f6a7
...
@@ -3186,15 +3186,11 @@ static noinline int mmc_ioctl_dvd_read_struct(struct cdrom_device_info *cdi,
...
@@ -3186,15 +3186,11 @@ static noinline int mmc_ioctl_dvd_read_struct(struct cdrom_device_info *cdi,
if
(
!
CDROM_CAN
(
CDC_DVD
))
if
(
!
CDROM_CAN
(
CDC_DVD
))
return
-
ENOSYS
;
return
-
ENOSYS
;
s
=
kmalloc
(
size
,
GFP_KERNEL
);
s
=
memdup_user
(
arg
,
size
);
if
(
!
s
)
if
(
IS_ERR
(
s
)
)
return
-
ENOMEM
;
return
PTR_ERR
(
s
)
;
cd_dbg
(
CD_DO_IOCTL
,
"entering DVD_READ_STRUCT
\n
"
);
cd_dbg
(
CD_DO_IOCTL
,
"entering DVD_READ_STRUCT
\n
"
);
if
(
copy_from_user
(
s
,
arg
,
size
))
{
kfree
(
s
);
return
-
EFAULT
;
}
ret
=
dvd_read_struct
(
cdi
,
s
,
cgc
);
ret
=
dvd_read_struct
(
cdi
,
s
,
cgc
);
if
(
ret
)
if
(
ret
)
...
...
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