提交 3be3aeb9 编写于 作者: J Jens Axboe 提交者: Xie XiuQi

scsi: sg: remove bad blk_end_request_all() call

mainline inclusion
from mainline-4.20-rc1
commit abaf75dd610ccfe1d085cb17061ac8862aabd2ea
category: bugfix
bugzilla: 10016
CVE: NA

---------------------------

We just need to free the request here. Additionally, this is currently
wrong for a queue that's using MQ currently, it'll crash.

Cc: Doug Gilbert <dgilbert@interlog.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: NJens Axboe <axboe@kernel.dk>
Acked-by: NDouglas Gilbert <dgilbert@interlog.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Nzhengbin <zhengbin13@huawei.com>
Reviewed-by: NJason Yan <yanaijie@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 347b450f
...@@ -822,7 +822,7 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp, ...@@ -822,7 +822,7 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp,
if (atomic_read(&sdp->detaching)) { if (atomic_read(&sdp->detaching)) {
if (srp->bio) { if (srp->bio) {
scsi_req_free_cmd(scsi_req(srp->rq)); scsi_req_free_cmd(scsi_req(srp->rq));
blk_end_request_all(srp->rq, BLK_STS_IOERR); blk_put_request(srp->rq);
srp->rq = NULL; srp->rq = NULL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册