1
0
Fork 0

nvme: lightnvm: frees wrong cmd structure

When struct nvme_request was introduced, the nvme_nvm_submit_io was
converted to the new interface. The interface moves nvme_nvm_command
data structure into the struct request pdu. On io completion, rq->cmd is
freed, which should have been the dereferenced pdu nvme_request->cmd.

Fixes: d49187e97e "nvme: introduce struct nvme_request"
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
hifive-unleashed-5.1
Matias Bjørling 2016-11-28 22:38:52 +01:00 committed by Jens Axboe
parent 415d3dab96
commit 7498e99fc5
1 changed files with 1 additions and 1 deletions

View File

@ -477,7 +477,7 @@ static void nvme_nvm_end_io(struct request *rq, int error)
rqd->ppa_status = nvme_req(rq)->result.u64;
nvm_end_io(rqd, error);
kfree(rq->cmd);
kfree(nvme_req(rq)->cmd);
blk_mq_free_request(rq);
}