Skip to content

Commit

Permalink
Revert "[SCSI] Remove full sg table memset()"
Browse files Browse the repository at this point in the history
A bit too eager - we definitely need to clear the sg table
initially, so that we don't accidentally have ->page & 0x01
true and think that is a chain pointer.

This reverts commit f5c0dde.
  • Loading branch information
Jens Axboe committed Oct 17, 2007
1 parent e6d5a11 commit a3bec5c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,8 @@ struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *cmd, gfp_t gfp_mask)
if (unlikely(!sgl))
goto enomem;

memset(sgl, 0, sizeof(*sgl) * sgp->size);

/*
* first loop through, set initial index and return value
*/
Expand Down

0 comments on commit a3bec5c

Please sign in to comment.