Re: [bug] ata subsystem related crash with latest -git

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linus Torvalds <torvalds@...>
Cc: David Miller <davem@...>, <fujita.tomonori@...>, <jens.axboe@...>, <mingo@...>, <linux-kernel@...>, <jgarzik@...>, <alan@...>, <tomof@...>
Date: Thursday, October 18, 2007 - 1:34 am

Mark Lord wrote:


However, Jens's patch from that same thread:

     http://lkml.org/lkml/2007/10/17/269

..allowed me to boot and post this followup message from -git12

Jeff: try that one.

Patch reproduced here for convenience:

Jens Axboe wrote:

diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 9e3f3cc..3935469 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -1322,8 +1322,8 @@ int blk_rq_map_sg(struct request_queue *q, struct request *rq,
 		  struct scatterlist *sglist)
 {
 	struct bio_vec *bvec, *bvprv;
-	struct scatterlist *next_sg, *sg;
 	struct req_iterator iter;
+	struct scatterlist *sg;
 	int nsegs, cluster;
 
 	nsegs = 0;
@@ -1333,7 +1333,7 @@ int blk_rq_map_sg(struct request_queue *q, struct request *rq,
 	 * for each bio in rq
 	 */
 	bvprv = NULL;
-	sg = next_sg = &sglist[0];
+	sg = NULL;
 	rq_for_each_segment(bvec, rq, iter) {
 		int nbytes = bvec->bv_len;
 
@@ -1349,8 +1349,10 @@ int blk_rq_map_sg(struct request_queue *q, struct request *rq,
 			sg->length += nbytes;
 		} else {
 new_segment:
-			sg = next_sg;
-			next_sg = sg_next(sg);
+			if (!sg)
+				sg = sglist;
+			else
+				sg = sg_next(sg);
 
 			memset(sg, 0, sizeof(*sg));
 			sg->page = bvec->bv_page;
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 0c86be7..aac8a02 100644
--- 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
 		 */

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[bug] block subsystem related crash with latest -git, Ingo Molnar, (Wed Oct 17, 11:46 am)
Re: [bug] block subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 12:50 pm)
Re: [bug] block subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 1:52 pm)
Re: [bug] block subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 2:18 pm)
Re: [bug] block subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 2:22 pm)
Re: [bug] block subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 1:56 pm)
Re: [bug] block subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 2:14 pm)
Re: [bug] block subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 2:13 pm)
Re: [bug] block subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 2:58 pm)
Re: [bug] block subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 3:15 pm)
Re: [bug] block subsystem related crash with latest -git, Luca Tettamanti, (Wed Oct 17, 4:15 pm)
[bug] ata subsystem related crash with latest -git, Ingo Molnar, (Wed Oct 17, 1:45 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 2:08 pm)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Wed Oct 17, 2:13 pm)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Wed Oct 17, 3:09 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 3:28 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 3:42 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 3:45 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 4:24 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 5:11 pm)
Re: [bug] ata subsystem related crash with latest -git, FUJITA Tomonori, (Wed Oct 17, 7:00 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 9:07 pm)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Wed Oct 17, 9:14 pm)
Re: [bug] ata subsystem related crash with latest -git, David Miller, (Wed Oct 17, 9:19 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 9:36 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Thu Oct 18, 12:01 am)
Re: [bug] ata subsystem related crash with latest -git, Mark Lord, (Thu Oct 18, 1:34 am)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Thu Oct 18, 1:45 am)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Thu Oct 18, 3:30 am)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Thu Oct 18, 12:20 am)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Thu Oct 18, 12:45 am)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Thu Oct 18, 12:31 am)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Thu Oct 18, 12:53 am)
Re: [bug] ata subsystem related crash with latest -git, Jens Axboe, (Thu Oct 18, 10:04 am)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Thu Oct 18, 12:14 am)
Re: [bug] ata subsystem related crash with latest -git, David Miller, (Wed Oct 17, 9:49 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Thu Oct 18, 12:55 pm)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Thu Oct 18, 3:20 pm)
Re: [bug] ata subsystem related crash with latest -git, Arjan van de Ven, (Thu Oct 18, 1:10 pm)
Re: [bug] ata subsystem related crash with latest -git, FUJITA Tomonori, (Fri Oct 19, 4:59 am)
Re: [bug] ata subsystem related crash with latest -git, David Miller, (Thu Oct 18, 7:55 am)
Re: [bug] ata subsystem related crash with latest -git, David Miller, (Thu Oct 18, 8:05 am)
Re: [bug] ata subsystem related crash with latest -git, Jens Axboe, (Thu Oct 18, 10:14 am)
Re: [bug] ata subsystem related crash with latest -git, Benny Halevy, (Thu Oct 18, 9:49 am)
Re: [bug] ata subsystem related crash with latest -git, Benny Halevy, (Thu Oct 18, 8:58 am)
Re: [bug] ata subsystem related crash with latest -git, Jens Axboe, (Thu Oct 18, 10:05 am)
Re: [bug] ata subsystem related crash with latest -git, Benny Halevy, (Thu Oct 18, 10:16 am)
Re: [bug] ata subsystem related crash with latest -git, Jens Axboe, (Thu Oct 18, 10:38 am)
Re: [bug] ata subsystem related crash with latest -git, Olof Johansson, (Thu Oct 18, 10:58 am)
Re: [bug] ata subsystem related crash with latest -git, Jens Axboe, (Thu Oct 18, 11:25 am)
Re: [bug] ata subsystem related crash with latest -git, David Miller, (Thu Oct 18, 8:36 am)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Wed Oct 17, 4:51 pm)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Thu Oct 18, 3:07 am)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Thu Oct 18, 4:22 am)
Re: [bug] ata subsystem related crash with latest -git, Torsten Kaiser, (Sat Oct 20, 7:55 am)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Thu Oct 18, 5:01 am)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Thu Oct 18, 5:32 am)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Thu Oct 18, 6:04 am)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Thu Oct 18, 6:13 am)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Thu Oct 18, 6:49 am)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Thu Oct 18, 6:50 am)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Thu Oct 18, 4:38 am)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Thu Oct 18, 4:51 am)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Thu Oct 18, 7:03 am)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 4:10 pm)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Wed Oct 17, 4:05 pm)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Wed Oct 17, 3:04 pm)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Wed Oct 17, 3:14 pm)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Wed Oct 17, 3:17 pm)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Wed Oct 17, 1:58 pm)