]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: lightnvm: frees wrong cmd structure
authorMatias Bjørling <m@bjorling.me>
Mon, 28 Nov 2016 21:38:52 +0000 (22:38 +0100)
committerJens Axboe <axboe@fb.com>
Tue, 29 Nov 2016 19:12:51 +0000 (12:12 -0700)
commitd648a42536c00fe996359f1938966a7c2354016f
tree07dc0f5c5f242347676262b3287869784a4f85ac
parentc3174c42be190bda3e6f6019699ecfc6755282af
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: d6d0caceaf40 "nvme: introduce struct nvme_request"
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/lightnvm.c