Christoph Hellwig a14d749fce virtio_blk: avoid DMA to stack for the sense buffer
Most users of BLOCK_PC requests allocate the sense buffer on the stack,
so to avoid DMA to the stack copy them to a field in the heap allocated
virtblk_req structure.  Without that any attempt at SCSI passthrough I/O,
including the SG_IO ioctl from userspace will crash the kernel.  Note that
this includes running tools like hdparm even when the host does not have
SCSI passthrough enabled.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org # v4.9+
Signed-off-by: Jens Axboe <axboe@fb.com>
2017-01-10 13:30:50 -07:00
..
2016-06-27 12:26:08 -07:00
2016-11-22 08:57:55 -07:00
2015-09-23 11:01:16 -06:00
2016-03-15 15:59:47 -07:00
2016-12-25 17:21:22 +01:00
2016-06-27 12:26:08 -07:00
2016-06-27 12:26:08 -07:00
2013-11-08 09:10:30 -07:00
2016-06-27 12:26:08 -07:00