--- /dev/null
+From: Jens Axboe <jens.axboe@oracle.com>
+Date: Tue Sep 16 09:54:11 2008 -0700
+Subject: use rq complete marking in blk_abort_request()
+Git: 7ba1fbaa4a478f72fbaf5a56af9c82a77966b4c7
+References: bnc#434105
+
+We cannot abort a request if we raced with the timeout handler already,
+or with the IO completion. So make blk_abort_request() mark the request
+as complete, and only continue if we succeeded.
+
+Found and suggested by Mike Anderson <andmike@linux.vnet.ibm.com>
+
+Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
+Signed-off-by: Hannes Reinecke <hare@suse.de>
+
+---
+ block/blk-timeout.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/block/blk-timeout.c
++++ b/block/blk-timeout.c
+@@ -99,6 +99,8 @@ void blk_rq_timed_out_timer(unsigned lon
+ */
+ void blk_abort_request(struct request *req)
+ {
++ if (blk_mark_rq_complete(req))
++ return;
+ blk_delete_timer(req);
+ blk_rq_timed_out(req);
+ }