aboutsummaryrefslogtreecommitdiffstats
path: root/block/scsi_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/scsi_ioctl.c')
-rw-r--r--block/scsi_ioctl.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
index a2c3a936ebf9..ffa3720e6ca0 100644
--- a/block/scsi_ioctl.c
+++ b/block/scsi_ioctl.c
@@ -217,8 +217,6 @@ EXPORT_SYMBOL_GPL(blk_verify_command);
217static int blk_fill_sghdr_rq(struct request_queue *q, struct request *rq, 217static int blk_fill_sghdr_rq(struct request_queue *q, struct request *rq,
218 struct sg_io_hdr *hdr, int has_write_perm) 218 struct sg_io_hdr *hdr, int has_write_perm)
219{ 219{
220 memset(rq->cmd, 0, BLK_MAX_CDB); /* ATAPI hates garbage after CDB */
221
222 if (copy_from_user(rq->cmd, hdr->cmdp, hdr->cmd_len)) 220 if (copy_from_user(rq->cmd, hdr->cmdp, hdr->cmd_len))
223 return -EFAULT; 221 return -EFAULT;
224 if (blk_verify_command(rq->cmd, has_write_perm)) 222 if (blk_verify_command(rq->cmd, has_write_perm))
@@ -531,7 +529,6 @@ static int __blk_send_generic(struct request_queue *q, struct gendisk *bd_disk,
531 rq->data_len = 0; 529 rq->data_len = 0;
532 rq->extra_len = 0; 530 rq->extra_len = 0;
533 rq->timeout = BLK_DEFAULT_SG_TIMEOUT; 531 rq->timeout = BLK_DEFAULT_SG_TIMEOUT;
534 memset(rq->cmd, 0, sizeof(rq->cmd));
535 rq->cmd[0] = cmd; 532 rq->cmd[0] = cmd;
536 rq->cmd[4] = data; 533 rq->cmd[4] = data;
537 rq->cmd_len = 6; 534 rq->cmd_len = 6;