Skip to content

Commit

Permalink
[SCSI] qlogicpti: fix sg list traversal error in continuation entries
Browse files Browse the repository at this point in the history
The current sg list traversal logic for the continuation entries
doesn't advance the list pointer once all seven slots are used, so the
next continuation entry (if there is one) wrongly begins again at the
start of the sg list.

Fix by advancing the sg pointer after the for_each_sg().

Reported-by: Meelis Roos <mroos@ut.ee>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
Boaz Harrosh authored and James Bottomley committed Sep 28, 2008
1 parent 44ea91c commit c9eeb24
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/scsi/qlogicpti.c
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,7 @@ static inline int load_cmd(struct scsi_cmnd *Cmnd, struct Command_Entry *cmd,
ds[i].d_count = sg_dma_len(s);
}
sg_count -= n;
sg = s;
}
} else {
cmd->dataseg[0].d_base = 0;
Expand Down

0 comments on commit c9eeb24

Please sign in to comment.