<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/cdrom/cdrom.c, branch linux-2.6.27.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.27.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.27.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-03-17T13:03:58Z</updated>
<entry>
<title>cdrom: use copy_to_user() without the underscores</title>
<updated>2012-03-17T13:03:58Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2012-02-06T09:20:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c0a0cff0f5242f0485fb9a4689000c7be2db686c'/>
<id>urn:sha1:c0a0cff0f5242f0485fb9a4689000c7be2db686c</id>
<content type='text'>
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 &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>block: add and use scsi_blk_cmd_ioctl</title>
<updated>2012-02-11T14:40:54Z</updated>
<author>
<name>Paolo Bonzini</name>
</author>
<published>2012-01-12T15:01:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7d064959836f6ab504b80a6ad858ed14aa0bb7a0'/>
<id>urn:sha1:7d064959836f6ab504b80a6ad858ed14aa0bb7a0</id>
<content type='text'>
commit 577ebb374c78314ac4617242f509e2f5e7156649 upstream.

Introduce a wrapper around scsi_cmd_ioctl that takes a block device.

The function will then be enhanced to detect partition block devices
and, in that case, subject the ioctls to whitelisting.

Cc: linux-scsi@vger.kernel.org
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: James Bottomley &lt;JBottomley@parallels.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
[bwh: Backport to 2.6.32 - adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
[wt: slightly changed the interface to match 2.6.27's scsi_cmd_ioctl()
     which still needs the file pointer but has no mode parameter].

Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>cdrom: handle TOC</title>
<updated>2008-08-18T19:40:04Z</updated>
<author>
<name>Alexander Inyukhin</name>
</author>
<published>2008-08-18T19:40:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bce31b674846584f0a80c95b6c09f07c32b9b041'/>
<id>urn:sha1:bce31b674846584f0a80c95b6c09f07c32b9b041</id>
<content type='text'>
This patch should fix TOC handling for cdroms that can not play audio.  It
extends commit af744e3294d09d706c4eae26cffaaa68a8d40337 ("cdrom: don't
check CDC_PLAY_AUDIO in cdrom_count_tracks()") with a safety check and
non-audio ioctls support.

Since CDC_PLAY_AUDIO flag was used not only to check ability to play audio
but also to ensure that audio_ioctl was not NULL, all TOC-related
operations had to use it.

As far as I understand, now audio_ioctl is never NULL, so a sanity check
during device registration should be sufficient.

It was tested on Optiarc AD7203A device, that has no ability to play
audio.

Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Cc: Borislav Petkov &lt;petkovbb@googlemail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
[bart: remove now unneeded -&gt;audio_ioctl check (noticed by Borislav)]
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
</entry>
<entry>
<title>cdrom: don't check CDC_PLAY_AUDIO in cdrom_count_tracks()</title>
<updated>2008-08-05T16:17:02Z</updated>
<author>
<name>Tejun Heo</name>
</author>
<published>2008-08-05T16:17:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=af744e3294d09d706c4eae26cffaaa68a8d40337'/>
<id>urn:sha1:af744e3294d09d706c4eae26cffaaa68a8d40337</id>
<content type='text'>
According to MMC-3 (or any later versions) READ TOCs are mandatory
commands and have nothing to do with CDC_PLAY_AUDIO.  I have no idea why
the check was put there in the first place but it now only breaks
automatic actions on certain drives.

Note that this test was only effective when ide-cdrom was being used
as sr didn't mask CDC_PLAY_AUDIO according to the capabilities.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Cc: Borislav Petkov &lt;petkovbb@googlemail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
</entry>
<entry>
<title>cdrom: revert commit 22a9189 (cdrom: use kmalloced buffers instead of buffers on stack)</title>
<updated>2008-07-04T07:52:14Z</updated>
<author>
<name>FUJITA Tomonori</name>
</author>
<published>2008-07-04T07:33:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fce5384755e8e0e56c5609d2972db4702990d592'/>
<id>urn:sha1:fce5384755e8e0e56c5609d2972db4702990d592</id>
<content type='text'>
The commit 22a9189fd073db3d03a4cf8b8c098aa207602de1 (cdrom: use
kmalloced buffers instead of buffers on stack) is introduced to use
kmalloced buffers for packet commands to avoid stack corruption on non
coherent platforms.

SCSI cdrom uses blk_rq_map_kern, which properly avoids DMA on the
stack by using the bounce buffers. IDE cdrom also has the mechnism to
avoids DMA on the stack. So we don't need this extra complexitiy in
cdrom.c, such as allocating just 8 bytes. The lower layers can handle
it.

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Cc: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
Cc: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
Cc: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
Cc: Tejun Heo &lt;htejun@gmail.com&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>block: no need to initialize rq-&gt;cmd with blk_get_request</title>
<updated>2008-04-29T12:48:55Z</updated>
<author>
<name>FUJITA Tomonori</name>
</author>
<published>2008-04-29T07:54:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=992b5bceee447a32ef2d617730ae0d03c063eedd'/>
<id>urn:sha1:992b5bceee447a32ef2d617730ae0d03c063eedd</id>
<content type='text'>
blk_get_request initializes rq-&gt;cmd (rq_init does) so the users don't
need to do that.

The purpose of this patch is to remove sizeof(rq-&gt;cmd) and &amp;rq-&gt;cmd,
as a preparation for large command support, which changes rq-&gt;cmd from
the static array to a pointer. sizeof(rq-&gt;cmd) will not make sense and
&amp;rq-&gt;cmd won't work.

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Cc: Alasdair G Kergon &lt;agk@redhat.com&gt;
Cc: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>cdrom: use kmalloced buffers instead of buffers on stack</title>
<updated>2008-04-21T07:50:08Z</updated>
<author>
<name>Thomas Bogendoerfer</name>
</author>
<published>2008-03-26T11:09:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=22a9189fd073db3d03a4cf8b8c098aa207602de1'/>
<id>urn:sha1:22a9189fd073db3d03a4cf8b8c098aa207602de1</id>
<content type='text'>
If cdrom commands are issued to a scsi drive in most cases the buffer will be
filled via dma.  This leads to bad stack corruption on non coherent platforms,
because the buffers are neither cache line aligned nor is the size a multiple
of the cache line size.  Using kmalloced buffers avoids this.

Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>cdrom: make unregister_cdrom() return void</title>
<updated>2008-04-21T07:50:08Z</updated>
<author>
<name>Akinobu Mita</name>
</author>
<published>2008-03-26T11:09:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0a0c4114df4a6903bccb65b06cabb6ddc968f877'/>
<id>urn:sha1:0a0c4114df4a6903bccb65b06cabb6ddc968f877</id>
<content type='text'>
Now unregister_cdrom() always returns 0.
Make it return void and update all callers that check the return value.

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Cc: Adrian McMenamin &lt;adrian@mcmen.demon.co.uk&gt;
Cc: Borislav Petkov &lt;petkovbb@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>cdrom: use list_head for cdrom_device_info list</title>
<updated>2008-04-21T07:50:08Z</updated>
<author>
<name>Akinobu Mita</name>
</author>
<published>2008-03-26T11:09:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7fd097d42b90afadae4867db5d580bcd7b3b596d'/>
<id>urn:sha1:7fd097d42b90afadae4867db5d580bcd7b3b596d</id>
<content type='text'>
Use list_head for cdrom_device_info list instead of opencoded
singly list handling.

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>cdrom: protect cdrom_device_info list by mutex</title>
<updated>2008-04-21T07:50:08Z</updated>
<author>
<name>Akinobu Mita</name>
</author>
<published>2008-03-26T11:09:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=032d8d90ba23e1770604bbb1102ec77f5aa8ae44'/>
<id>urn:sha1:032d8d90ba23e1770604bbb1102ec77f5aa8ae44</id>
<content type='text'>
This patch protects the list of cdrom_device_info by cdrom_mutex
when the file in /proc/sys/dev/cdrom/ is written.

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
</feed>
