Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40952
b: refs/heads/master
c: 097b845
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Linus Torvalds committed Nov 16, 2006
1 parent 78115a4 commit d49909b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ae56fb16337c882c52806508f93ead4034004c7a
refs/heads/master: 097b8457dafe7efc22201b4062e2d1e82e494067
3 changes: 1 addition & 2 deletions trunk/block/scsi_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,8 @@ static int sg_io(struct file *file, request_queue_t *q,
* fill in request structure
*/
rq->cmd_len = hdr->cmd_len;
memset(rq->cmd, 0, BLK_MAX_CDB); /* ATAPI hates garbage after CDB */
memcpy(rq->cmd, cmd, hdr->cmd_len);
if (sizeof(rq->cmd) != hdr->cmd_len)
memset(rq->cmd + hdr->cmd_len, 0, sizeof(rq->cmd) - hdr->cmd_len);

memset(sense, 0, sizeof(sense));
rq->sense = sense;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd,
goto free_req;

req->cmd_len = cmd_len;
memset(req->cmd, 0, BLK_MAX_CDB); /* ATAPI hates garbage after CDB */
memcpy(req->cmd, cmd, req->cmd_len);
req->sense = sioc->sense;
req->sense_len = 0;
Expand Down

0 comments on commit d49909b

Please sign in to comment.