]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
cdrom: use copy_to_user() without the underscores
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 6 Feb 2012 09:20:45 +0000 (10:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Mar 2012 17:49:22 +0000 (09:49 -0800)
commit3e9d6c33830beee43dc1b94bdbff41109455fa58
treeb1da466fe16d5481ae7f639281c276d4747c944f
parentd298243d8b3e63554553a729aec6b9e1502ce00d
cdrom: use copy_to_user() without the underscores

commit 822bfa51ce44f2c63c300fdb76dc99c4d5a5ca9f upstream.

"nframes" comes from the user and "nframes * CD_FRAMESIZE_RAW" can wrap
on 32 bit systems.  That would have been ok if we used the same wrapped
value for the copy, but we use a shifted value.  We should just use the
checked version of copy_to_user() because it's not going to make a
difference to the speed.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/cdrom/cdrom.c