FUJITA Tomonori 015640edb1 [SCSI] sg: fix q->queue_lock on scsi_error_handler path
sg_rq_end_io() is called via rq->end_io. In some rare cases,
sg_rq_end_io calls blk_put_request/blk_rq_unmap_user (when a program
issuing a command has gone before the command completion; e.g. by
interrupting a program issuing a command before the command
completes).

We can't call blk_put_request/blk_rq_unmap_user in interrupt so the
commit c96952ed7031e7c576ecf90cf95b8ec099d5295a uses
execute_in_process_context().

The problem is that scsi_error_handler() calls rq->end_io too. We
can't call blk_put_request/blk_rq_unmap_user too in this path (we hold
q->queue_lock).

To avoid the above problem, in these rare cases, this patch always
uses schedule_work() instead of execute_in_process_context().

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-04-03 10:23:16 -05:00
..
2009-04-03 09:23:11 -05:00
2009-03-28 20:30:18 +00:00
2009-03-12 12:58:02 -05:00
2008-01-11 18:22:30 -06:00
2009-04-03 10:17:31 -05:00
2009-04-03 10:17:31 -05:00
2009-04-03 10:17:17 -05:00
2009-04-03 10:17:17 -05:00
2008-10-16 16:52:06 +02:00
2009-03-13 15:48:43 -05:00
2009-03-12 12:58:02 -05:00
2008-12-29 11:24:14 -06:00
2008-08-29 02:13:10 -07:00
2008-11-30 10:03:36 -08:00
2008-10-09 08:56:13 +02:00
2009-03-12 12:58:02 -05:00
2009-03-12 12:57:58 -05:00
2009-03-12 12:58:02 -05:00
2008-01-30 13:14:02 -06:00
2008-12-28 20:00:03 +01:00
2008-01-30 13:14:02 -06:00
2009-04-03 09:24:42 -05:00
2009-04-03 09:24:42 -05:00
2008-01-30 13:14:02 -06:00
2009-03-12 12:58:10 -05:00
2009-04-03 09:22:55 -05:00
2008-10-23 11:42:17 -05:00
2009-03-12 12:58:05 -05:00
2007-07-18 11:16:32 -05:00
2008-07-02 15:06:25 -06:00
2009-04-03 09:22:55 -05:00
2009-03-17 21:43:52 -04:00
2009-04-03 09:22:55 -05:00
2008-02-07 18:02:44 -06:00
2009-03-12 12:58:02 -05:00
2009-01-02 12:02:25 -06:00
2008-10-23 11:42:19 -05:00
2007-10-19 23:22:55 +02:00