<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/ide/ide-cd.c, branch linux-2.6.30.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.30.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.30.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2009-07-02T23:51:05Z</updated>
<entry>
<title>ide-cd: prevent null pointer deref via cdrom_newpc_intr</title>
<updated>2009-07-02T23:51:05Z</updated>
<author>
<name>Rainer Weikusat</name>
</author>
<published>2009-06-18T15:04:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2547a3000f19e677ab5eb7e1a9c01164f5bd7922'/>
<id>urn:sha1:2547a3000f19e677ab5eb7e1a9c01164f5bd7922</id>
<content type='text'>
commit 39c58f37a10198054c656c28202fb1e6d22fd505 upstream.

With 2.6.30, the error handling code in cdrom_newpc_intr was changed
to deal with partial request failures by normally completing the 'good'
parts of a request and only 'error' the last (and presumably,
incompletely transferred) bio associated with a particular
request. In order to do this, ide_complete_rq is called over
ide_cd_error_cmd() to partially complete the rq. The block layer
does partial completion only for requests with bio's and if the
rq doesn't have one (eg 'GPCMD_READ_DISC_INFO') the request is
completed as a whole and the drive-&gt;hwif-&gt;rq pointer set to NULL
afterwards. When calling ide_complete_rq again to report
the error, this null pointer is derefenced, resulting in a kernel
crash.

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=13399.

Signed-off-by: Rainer Weikusat &lt;rweikusat@mssgmbh.com&gt;
Signed-off-by: Borislav Petkov &lt;petkovbb@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ide-cd: fix REQ_QUIET tests in cdrom_decode_status</title>
<updated>2009-04-30T16:24:34Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2009-04-30T16:24:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=96c16743973e8c1a7b9c655d10b7973408d6d1dd'/>
<id>urn:sha1:96c16743973e8c1a7b9c655d10b7973408d6d1dd</id>
<content type='text'>
Original patch (dfa4411cc3a690011cab90e9a536938795366cf9) was buggy.
This is a more proper fix which introduces blk_rq_quiet() macro
alleviating the need for dumb, too short caching variables.

Thanks to Helge Deller and Bart for debugging this.

Signed-off-by: Borislav Petkov &lt;petkovbb@gmail.com&gt;
Cc: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Cc: Sergei Shtylyov &lt;sshtylyov@ru.mvista.com&gt;
Reported-and-tested-by: Helge Deller &lt;deller@gmx.de&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
</entry>
<entry>
<title>ide-cd: fix kernel crash on hppa regression</title>
<updated>2009-04-22T18:33:40Z</updated>
<author>
<name>Helge Deller</name>
</author>
<published>2009-04-22T18:33:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a1f9a89c90b4ac143c5b6054c2a157572b272cd2'/>
<id>urn:sha1:a1f9a89c90b4ac143c5b6054c2a157572b272cd2</id>
<content type='text'>
With 2.6.30-rc2 I face a kernel crash on the 32bit hppa architecture 
due to ide-cd when udev creates the device nodes at startup:

Kernel Fault: Code=26 regs=8ed34c40 (Addr=00000024)
IASQ: 00000000 00000000 IAOQ: 1034b5ac 1034b5b0
 IIR: 4ab30048    ISR: 00000000  IOR: 00000024
 CPU:        0   CR30: 8ed34000 CR31: ffff55ff
 ORIG_R28: 00000000
 IAOQ[0]: ide_complete_rq+0x2c/0x70
 IAOQ[1]: ide_complete_rq+0x30/0x70
 RP(r2): cdrom_newpc_intr+0x178/0x46c
Backtrace:
 [&lt;1035c608&gt;] cdrom_newpc_intr+0x178/0x46c
 [&lt;1034c494&gt;] ide_intr+0x1b0/0x214
 [&lt;1016d284&gt;] handle_IRQ_event+0x70/0x150
 [&lt;1016d4b0&gt;] __do_IRQ+0x14c/0x1cc
 [&lt;102f7864&gt;] superio_interrupt+0x88/0xbc
 [&lt;1016d284&gt;] handle_IRQ_event+0x70/0x150
 [&lt;1016d4b0&gt;] __do_IRQ+0x14c/0x1cc
 [&lt;10112efc&gt;] do_cpu_irq_mask+0x9c/0xd0
 [&lt;10116068&gt;] intr_return+0x0/0x4

This crash seems to happen due to an uninitialized variable "rc".
The compiler even warns about that:
  CC      drivers/ide/ide-cd.o                                                         
/mnt/sda4/home/cvs/parisc/git-kernel/linus-linux-2.6/drivers/ide/ide-cd.c: In function `cdrom_newpc_intr':
/mnt/sda4/home/cvs/parisc/git-kernel/linus-linux-2.6/drivers/ide/ide-cd.c:612: warning: `rc' might be used uninitialized in this function

After applying the trivial patch below, which just initializes 
the variable to zero, the kernel doesn't crash any longer:

Starting the hotplug events dispatcher: udevd.
Synthesizing the initial hotplug events...
hda: command error: status=0x51 { DriveReady SeekComplete Error }
hda: command error: error=0x54 &lt;3&gt;{ AbortedCommand LastFailedSense=0x05 }
ide: failed opcode was: unknown
done.

Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Acked-by: Borislav Petkov &lt;petkovbb@gmail.com&gt;
Cc: Linus &lt;torvalds@linux-foundation.org&gt;
Cc: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
</entry>
<entry>
<title>ide-cd: reverse NOT_READY sense key logic</title>
<updated>2009-04-08T12:13:03Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2009-04-08T12:13:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3c8a48e9a94be1e063f2f8d7d5f6f691423a3e71'/>
<id>urn:sha1:3c8a48e9a94be1e063f2f8d7d5f6f691423a3e71</id>
<content type='text'>
Make the case of flushing the drive's cache explicit.

There should be no functional change resulting from this patch.

Signed-off-by: Borislav Petkov &lt;petkovbb@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
</entry>
<entry>
<title>ide-cd: fix intendation in cdrom_decode_status()</title>
<updated>2009-04-08T12:12:54Z</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
</author>
<published>2009-04-08T12:12:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=674f0ea111bc9bff1b4e4841d7da38933c5e3b59'/>
<id>urn:sha1:674f0ea111bc9bff1b4e4841d7da38933c5e3b59</id>
<content type='text'>
Based on earlier work by Borislav Petkov.

Fix intendation in cdrom_decode_status(), no real code changes.

While at it:
- beautify comments

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
Signed-off-by: Borislav Petkov &lt;petkovbb@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
</entry>
<entry>
<title>ide-cd: unify handling of fs and pc requests in cdrom_decode_status()</title>
<updated>2009-04-08T12:12:54Z</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
</author>
<published>2009-04-08T12:12:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1920c48d796ce7240ba267cb0be85c51895258f8'/>
<id>urn:sha1:1920c48d796ce7240ba267cb0be85c51895258f8</id>
<content type='text'>
Based on earlier work by Borislav Petkov.

Unify handling of fs and pc requests in cdrom_decode_status().

While at it:
- remove unreachable code

The only change in functionality is that for pc requests more
detailed error message will be printed for following sense keys:
* ILLEGAL_REQUEST
* DATA_PROTECT
* MEDIUM_ERROR
* BLANK_CHECK

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
Signed-off-by: Borislav Petkov &lt;petkovbb@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
</entry>
<entry>
<title>ide-cd: convert cdrom_decode_status() to use switch statements</title>
<updated>2009-04-08T12:12:53Z</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
</author>
<published>2009-04-08T12:12:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e01f251fd09fa7cb3d352eac7de17bb5d5bd1f9d'/>
<id>urn:sha1:e01f251fd09fa7cb3d352eac7de17bb5d5bd1f9d</id>
<content type='text'>
Based on earlier work by Borislav Petkov.

Convert cdrom_decode_status() to use switch statements in
preparation to unify handling of fs and pc requests.

While at it:
- remove superfluous comments and do minor CodingStyle fixups

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
Signed-off-by: Borislav Petkov &lt;petkovbb@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
</entry>
<entry>
<title>ide-cd: update debugging support</title>
<updated>2009-04-08T12:12:53Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2009-04-08T12:12:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=98036abf31994244cb5772ecc291f4293a52c20b'/>
<id>urn:sha1:98036abf31994244cb5772ecc291f4293a52c20b</id>
<content type='text'>
Signed-off-by: Borislav Petkov &lt;petkovbb@gmail.com&gt;
[bart: extracted from "ide-cd: cleanup cdrom_decode_status" patch]
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
</entry>
<entry>
<title>ide-cd: respect REQ_QUIET for fs requests in cdrom_decode_status()</title>
<updated>2009-04-08T12:12:53Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2009-04-08T12:12:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dfa4411cc3a690011cab90e9a536938795366cf9'/>
<id>urn:sha1:dfa4411cc3a690011cab90e9a536938795366cf9</id>
<content type='text'>
There should be no functional change resulting from this patch.

Suggested-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
Signed-off-by: Borislav Petkov &lt;petkovbb@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
</entry>
<entry>
<title>ide-cd: carve out an ide_cd_breathe()-helper for fs write requests</title>
<updated>2009-04-08T12:12:52Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2009-04-08T12:12:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=805ec58ad7fd1f65eeb75ed38f11bd08fbd3b988'/>
<id>urn:sha1:805ec58ad7fd1f65eeb75ed38f11bd08fbd3b988</id>
<content type='text'>
There should be no functional change resulting from this patch.

Signed-off-by: Borislav Petkov &lt;petkovbb@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
</content>
</entry>
</feed>
