[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180716073451.554302298@linuxfoundation.org>
Date: Mon, 16 Jul 2018 09:35:20 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Christoph Hellwig <hch@....de>,
Tony Battersby <tonyb@...ernetics.com>,
Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 4.17 51/67] bsg: fix bogus EINVAL on non-data commands
4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tony Battersby <tonyb@...ernetics.com>
commit 70dbcc2254fa2a9add74a122b9dac954c4736e01 upstream.
Fix a regression introduced in Linux kernel 4.17 where sending a SCSI
command that does not transfer data (such as TEST UNIT READY) via
/dev/bsg/* results in EINVAL.
Fixes: 17cb960f29c2 ("bsg: split handling of SCSI CDBs vs transport requeues")
Cc: <stable@...r.kernel.org> # 4.17+
Reviewed-by: Christoph Hellwig <hch@....de>
Signed-off-by: Tony Battersby <tonyb@...ernetics.com>
Signed-off-by: Jens Axboe <axboe@...nel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
block/bsg.c | 2 --
1 file changed, 2 deletions(-)
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -268,8 +268,6 @@ bsg_map_hdr(struct request_queue *q, str
} else if (hdr->din_xfer_len) {
ret = blk_rq_map_user(q, rq, NULL, uptr64(hdr->din_xferp),
hdr->din_xfer_len, GFP_KERNEL);
- } else {
- ret = blk_rq_map_user(q, rq, NULL, NULL, 0, GFP_KERNEL);
}
if (ret)
Powered by blists - more mailing lists