summaryrefslogtreecommitdiff
path: root/drivers/block/nbd.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-01-09 18:56:23 +0300
committerJens Axboe <axboe@fb.com>2017-01-10 23:30:50 +0300
commita14d749fcebe97ddf6af6db3d1f6ece85c9ddcb9 (patch)
treeb441577383d9ca1586799d28a031d99e9d6e967d /drivers/block/nbd.c
parentdd545b52a3e1efd9f2c6352dbe95ccd0c53461cc (diff)
downloadlinux-a14d749fcebe97ddf6af6db3d1f6ece85c9ddcb9.tar.xz
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>
Diffstat (limited to 'drivers/block/nbd.c')
0 files changed, 0 insertions, 0 deletions