Rainer Weikusat 39c58f37a1 ide-cd: prevent null pointer deref via cdrom_newpc_intr
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->hwif->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 <rweikusat@mssgmbh.com>
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-06-20 12:22:47 +02:00
..
2009-06-15 18:52:53 +02:00
2009-05-17 19:12:25 +02:00
2009-06-15 18:52:58 +02:00
2009-05-17 19:12:25 +02:00
2009-01-06 17:20:52 +01:00
2009-05-17 19:12:25 +02:00
2009-03-27 12:46:28 +01:00
2009-05-17 19:12:25 +02:00
2009-05-17 19:12:25 +02:00
2009-04-08 14:13:02 +02:00
2009-05-17 19:12:25 +02:00
2009-03-27 12:46:45 +01:00
2009-06-15 22:16:10 +02:00
2009-05-15 06:44:38 +02:00
2009-06-15 22:16:10 +02:00
2009-03-27 12:46:34 +01:00
2009-05-17 19:12:25 +02:00
2009-05-17 19:12:25 +02:00
2009-04-08 14:13:03 +02:00
2009-05-17 19:12:25 +02:00
2009-04-28 07:37:30 +02:00
2009-05-17 19:12:25 +02:00
2009-06-15 22:16:10 +02:00
2009-06-15 18:52:53 +02:00
2009-06-15 18:52:53 +02:00
2008-11-02 21:40:08 +01:00
2009-04-08 14:13:03 +02:00
2009-05-17 19:12:25 +02:00
2009-06-15 18:52:53 +02:00
2009-05-17 19:12:25 +02:00
2009-05-17 19:12:25 +02:00
2009-05-17 19:12:25 +02:00
2009-06-15 18:52:55 +02:00
2009-06-15 18:53:00 +02:00
2009-06-15 18:52:53 +02:00
2009-01-06 17:20:52 +01:00
2009-05-17 19:12:25 +02:00