The patch titled scsi: properly count the number of pages in scsi_req_map_sg() has been added to the -mm tree. Its filename is scsi-properly-count-the-number-of-pages-in-scsi_req_map_sg.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: scsi: properly count the number of pages in scsi_req_map_sg() From: Bryan Holty <lgeek@xxxxxxxxxxxxxxx> Without this change, with 4K io's every sg io that is dma_aligned for direct io, but not page aligned will cause slab corruption and an oops I am able to run a number of tests with sg that cause the boundary to be crossed, and with this fix there is no slab corruption or data corruption. [akpm: use PAGE_ALIGN()] [akpm: needs better changelog] Signed-off-by: Bryan Holty <lgeek@xxxxxxxxxxxxxxx> Cc: Mike Christie <michaelc@xxxxxxxxxxx> Cc: James Bottomley <James.Bottomley@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/scsi/scsi_lib.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/scsi/scsi_lib.c~scsi-properly-count-the-number-of-pages-in-scsi_req_map_sg drivers/scsi/scsi_lib.c --- 25/drivers/scsi/scsi_lib.c~scsi-properly-count-the-number-of-pages-in-scsi_req_map_sg Fri May 26 15:45:49 2006 +++ 25-akpm/drivers/scsi/scsi_lib.c Fri May 26 15:45:49 2006 @@ -367,7 +367,7 @@ static int scsi_req_map_sg(struct reques int nsegs, unsigned bufflen, gfp_t gfp) { struct request_queue *q = rq->q; - int nr_pages = (bufflen + PAGE_SIZE - 1) >> PAGE_SHIFT; + int nr_pages = PAGE_ALIGN(bufflen + sgl[0].offset); unsigned int data_len = 0, len, bytes, off; struct page *page; struct bio *bio = NULL; _ Patches currently in -mm which might be from lgeek@xxxxxxxxxxxxxxx are scsi-properly-count-the-number-of-pages-in-scsi_req_map_sg.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html