- scsi-properly-count-the-number-of-pages-in-scsi_req_map_sg.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     scsi: properly count the number of pages in scsi_req_map_sg()

has been removed from the -mm tree.  Its filename is

     scsi-properly-count-the-number-of-pages-in-scsi_req_map_sg.patch

This patch was probably dropped from -mm because
it has now been merged into a subsystem tree or
into Linus's tree, or because it was folded into
its parent patch in the -mm tree.

------------------------------------------------------
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

git-scsi-rc-fixes.patch
scsi-properly-count-the-number-of-pages-in-scsi_req_map_sg-fix.patch
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

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux