提交 4613ea33 编写于 作者: S Sagi Grimberg 提交者: Xie XiuQi

nvme: fix kernel paging oops

mainline inclusion
from mainline-5.0-rc1
commit 092ff052
category: bugfix
bugzilla: 9963
CVE: NA
---------------------------

free the controller discard_page correctly.

Fixes: cb5b7262 ("nvme: provide fallback for discard alloc failure")
Signed-off-by: NSagi Grimberg <sagi@grimberg.me>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
Signed-off-by: NYufen Yu <yuyufen@huawei.com>
Reviewed-by: NMiao Xie <miaoxie@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 d49952cc
...@@ -3538,7 +3538,7 @@ static void nvme_free_ctrl(struct device *dev) ...@@ -3538,7 +3538,7 @@ static void nvme_free_ctrl(struct device *dev)
ida_simple_remove(&nvme_instance_ida, ctrl->instance); ida_simple_remove(&nvme_instance_ida, ctrl->instance);
kfree(ctrl->effects); kfree(ctrl->effects);
nvme_mpath_uninit(ctrl); nvme_mpath_uninit(ctrl);
kfree(ctrl->discard_page); __free_page(ctrl->discard_page);
if (subsys) { if (subsys) {
mutex_lock(&subsys->lock); mutex_lock(&subsys->lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册