public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH block#for-2.6.31] block: fix a possible oops on elv_abort_queue()
@ 2009-06-01 23:42 Kiyoshi Ueda
  2009-06-02  6:43 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Kiyoshi Ueda @ 2009-06-01 23:42 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel, Jun'ichi Nomura, k-ueda

Hi Jens,

I found one more mis-conversion to the 'request is always dequeued
when completing' model in elv_abort_queue() during code inspection.
Although I haven't hit any problem caused by this mis-conversion yet
and just done compile/boot test, please apply if you have no problem.


Request must be dequeued when it completes.
However, elv_abort_queue() completes requests without dequeueing.
This will cause oops in the __blk_end_request_all().
This patch fixes the oops.

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
---
 block/elevator.c |    5 +++++
 1 file changed, 5 insertions(+)

Index: linux-2.6-block/block/elevator.c
===================================================================
--- linux-2.6-block.orig/block/elevator.c
+++ linux-2.6-block/block/elevator.c
@@ -813,6 +813,11 @@ void elv_abort_queue(struct request_queu
 		rq = list_entry_rq(q->queue_head.next);
 		rq->cmd_flags |= REQ_QUIET;
 		trace_block_rq_abort(q, rq);
+		/*
+		 * Mark this request as started so we don't trigger
+		 * any debug logic in the end I/O path.
+		 */
+		blk_start_request(rq);
 		__blk_end_request_all(rq, -EIO);
 	}
 }

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-02  6:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-01 23:42 [PATCH block#for-2.6.31] block: fix a possible oops on elv_abort_queue() Kiyoshi Ueda
2009-06-02  6:43 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox