Skip to content
Commit 2ba136da authored by Tony Battersby's avatar Tony Battersby Committed by Jens Axboe
Browse files

fix regression in SCSI_IOCTL_SEND_COMMAND

blk_rq_set_block_pc() memsets rq->cmd to 0, so it should come
immediately after blk_get_request() to avoid overwriting the
user-supplied CDB.  Also check for failure to allocate rq.

Fixes: f27b087b

 ("block: add blk_rq_set_block_pc()")
Cc: <stable@vger.kernel.org> # 3.16.x
Signed-off-by: default avatarTony Battersby <tonyb@cybernetics.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 6f4a1626
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