projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e6d5a11
)
Revert "[SCSI] Remove full sg table memset()"
author
Jens Axboe
<axboe@carl.home.kernel.dk>
Wed, 17 Oct 2007 17:33:05 +0000
(19:33 +0200)
committer
Jens Axboe
<axboe@carl.home.kernel.dk>
Wed, 17 Oct 2007 17:33:05 +0000
(19:33 +0200)
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
f5c0dde4c66421a3a2d7d6fa604a712c9b0744e5
.
drivers/scsi/scsi_lib.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/scsi_lib.c
b/drivers/scsi/scsi_lib.c
index 0c86be71bb33773d504a325270deaf00b88655a2..aac8a02cbe8040348d8383d8551514a619598b2d 100644
(file)
--- a/
drivers/scsi/scsi_lib.c
+++ b/
drivers/scsi/scsi_lib.c
@@
-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
*/