Jeff Garzik wrote: > > Alan's point was that the existing code will give you up to > LIBATA_MAX_PRD entries. After the post-virtual-merge splitting code in > ata_fill_sg() executes, the worst case result is ATA_MAX_PRD entries. > > Thus, since your code has the potential to increase the number of s/g > entries above that, it can potentially corrupt memory, lock up the > machine, all the wonderful things that can happen when you run off the > end of the s/g list. > > The fix is to decrease .sg_tablesize (LIBATA_MAX_PRD - 2 perhaps?) so > that you guarantee this worst case never occurs, by guaranteeing that > the system never sends you enough s/g entries to cause your code to go > out of bounds. > Ah, now I understand. Thanks for the explanation. I take it something guarantees that s/g entry size can not exceed 128K. -- ./lxnt - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html