]> git.baikalelectronics.ru Git - kernel.git/commit
block: fix oops with block tag queueing
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Wed, 27 May 2009 12:17:08 +0000 (14:17 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 27 May 2009 12:17:08 +0000 (14:17 +0200)
commitc350edf8868e45b1da4b4977fd50a17a695f5c22
treeba8bf30382d1891c7f540264b6229db1bc1eb797
parent6d03aa39c33d55a7098cde6ce78fc551774ef2e5
block: fix oops with block tag queueing

commit e8939a50466fd963eb1ba9118c34b9ffb7ff6aa6
Author: Tejun Heo <tj@kernel.org>
Date:   Fri May 8 11:54:16 2009 +0900

    block: implement and enforce request peek/start/fetch

Added a BUG_ON(blk_queued_rq(req)) to the top of blk_finish_req().
Unfortunately, this checks whether req->queuelist is empty.  This list
is doing double duty both as the queue list and the tag list, so tagged
requests come in here with this not empty and boom (the tag list is
emptied by blk_queue_end_tag() lower down).

Fix this by moving the BUG_ON to below the end tag we also seem
vulnerable to this in blk_requeue_request() as well.  I think all uses
of blk_queued_rq() need auditing because the check is clearly wrong in
the tagged case.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/blk-core.c