NVMe: fix freeing of wrong request in abort path
authorSam Bradshaw <sbradshaw@micron.com>
Wed, 10 Dec 2014 20:00:31 +0000 (13:00 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 10 Dec 2014 20:00:31 +0000 (13:00 -0700)
We allocate 'abort_req', but free 'req' in case of an error
submitting the IO.

Signed-off-by: Sam Bradshaw <sbradshaw@micron.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/nvme-core.c

index bcbdf832b1b09727213f5532c23404c89df0a12d..cf9b8a8a24d3e867463653455ef53051ee4b3728 100644 (file)
@@ -1053,7 +1053,7 @@ static void nvme_abort_req(struct request *req)
                dev_warn(nvmeq->q_dmadev,
                                "Could not abort I/O %d QID %d",
                                req->tag, nvmeq->qid);
-               blk_mq_free_request(req);
+               blk_mq_free_request(abort_req);
        }
 }