Skip to content
Commit efea2abc authored by Bart Van Assche's avatar Bart Van Assche Committed by Jens Axboe
Browse files

virtio_blk: Fix an SG_IO regression



Avoid that submitting an SG_IO ioctl triggers a kernel oops that
is preceded by:

usercopy: kernel memory overwrite attempt detected to (null) (<null>) (6 bytes)
kernel BUG at mm/usercopy.c:72!

Reported-by: default avatarDann Frazier <dann.frazier@canonical.com>
Fixes: commit ca18d6f7 ("block: Make most scsi_req_init() calls implicit")
Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Dann Frazier <dann.frazier@canonical.com>
Cc: <stable@vger.kernel.org> # v4.13
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>

Moved virtblk_initialize_rq() inside CONFIG_VIRTIO_BLK_SCSI.

Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 93689a60
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment