]> git.baikalelectronics.ru Git - kernel.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)
committerJens Axboe <axboe@kernel.dk>
Mon, 6 Feb 2012 09:20:45 +0000 (10:20 +0100)
commit9010d92f5e7525013fbb707ab53631b17e6a0dec
treec9eaa4357b5ebca49c47bd5a25beabaa992442aa
parentabd9c8aa0808c98f7fb5bd8a4b26f71e214f6837
cdrom: use copy_to_user() without the underscores

"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.

Cc: stable@vger.kernel.com
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/cdrom/cdrom.c