All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bsg: fix bogus EINVAL on non-data commands
@ 2018-07-10 16:52 Tony Battersby
  2018-07-11  6:37 ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Tony Battersby @ 2018-07-10 16:52 UTC (permalink / raw)
  To: FUJITA Tomonori, Jens Axboe, Christoph Hellwig, linux-scsi,
	linux-block
  Cc: Hannes Reinecke, Johannes Thumshirn

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@vger.kernel.org> # 4.17+
Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
---
diff --git a/block/bsg.c b/block/bsg.c
index 66602c4..b16ab6f 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -268,7 +268,7 @@ bsg_map_hdr(struct request_queue *q, str
 		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);
+		ret = 0;
 	}
 
 	if (ret)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-11 14:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-10 16:52 [PATCH] bsg: fix bogus EINVAL on non-data commands Tony Battersby
2018-07-11  6:37 ` Christoph Hellwig
2018-07-11 14:46   ` [PATCH v2] " Tony Battersby
2018-07-11 14:48     ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.