Re: 2.6.23-rc8-mm2: OOPS in mmc on boot

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Pierre Ossman <drzeus@...>
Cc: Don Mullis <dwm@...>, Andrew Morton <akpm@...>, <linux-kernel@...>
Date: Thursday, October 4, 2007 - 12:42 pm

On Thu, Oct 04 2007, Pierre Ossman wrote:

I already put it in the sgchain drivers part. If you could please ack
it, that would be nice :-). I have a bunch of driver
updates/work-arounds there.


Once should actually be enough, so you could move it to init as well.
Don, care to verify with the below patch as well?


No, it's for 2.6.24.

diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index b0abc7d..a5d0354 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -153,14 +153,14 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock
 			blk_queue_max_hw_segments(mq->queue, bouncesz / 512);
 			blk_queue_max_segment_size(mq->queue, bouncesz);
 
-			mq->sg = kmalloc(sizeof(struct scatterlist),
+			mq->sg = kzalloc(sizeof(struct scatterlist),
 				GFP_KERNEL);
 			if (!mq->sg) {
 				ret = -ENOMEM;
 				goto cleanup_queue;
 			}
 
-			mq->bounce_sg = kmalloc(sizeof(struct scatterlist) *
+			mq->bounce_sg = kzalloc(sizeof(struct scatterlist) *
 				bouncesz / 512, GFP_KERNEL);
 			if (!mq->bounce_sg) {
 				ret = -ENOMEM;
@@ -177,7 +177,7 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock
 		blk_queue_max_hw_segments(mq->queue, host->max_hw_segs);
 		blk_queue_max_segment_size(mq->queue, host->max_seg_size);
 
-		mq->sg = kmalloc(sizeof(struct scatterlist) *
+		mq->sg = kzalloc(sizeof(struct scatterlist) *
 			host->max_phys_segs, GFP_KERNEL);
 		if (!mq->sg) {
 			ret = -ENOMEM;

-- 
Jens Axboe

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

Messages in current thread:
2.6.23-rc8-mm2: OOPS in mmc on boot, Don Mullis, (Thu Oct 4, 2:11 am)
Re: 2.6.23-rc8-mm2: OOPS in mmc on boot, Andrew Morton, (Thu Oct 4, 2:16 am)
Re: 2.6.23-rc8-mm2: OOPS in mmc on boot, Pierre Ossman, (Thu Oct 4, 3:28 am)
Re: 2.6.23-rc8-mm2: OOPS in mmc on boot, Jens Axboe, (Thu Oct 4, 3:25 am)
Re: 2.6.23-rc8-mm2: OOPS in mmc on boot, Don Mullis, (Thu Oct 4, 12:19 pm)
Re: 2.6.23-rc8-mm2: OOPS in mmc on boot, Pierre Ossman, (Thu Oct 4, 12:35 pm)
Re: 2.6.23-rc8-mm2: OOPS in mmc on boot, Jens Axboe, (Thu Oct 4, 12:42 pm)
Re: 2.6.23-rc8-mm2: OOPS in mmc on boot, Don Mullis, (Thu Oct 4, 1:06 pm)
Re: 2.6.23-rc8-mm2: OOPS in mmc on boot, Jens Axboe, (Thu Oct 4, 2:10 pm)
Re: 2.6.23-rc8-mm2: OOPS in mmc on boot, Pierre Ossman, (Thu Oct 4, 12:46 pm)
Re: 2.6.23-rc8-mm2: OOPS in mmc on boot, Pierre Ossman, (Thu Oct 4, 4:01 am)
Re: 2.6.23-rc8-mm2: OOPS in mmc on boot, Jens Axboe, (Thu Oct 4, 4:06 am)
Re: 2.6.23-rc8-mm2: OOPS in mmc on boot, Pierre Ossman, (Thu Oct 4, 4:46 am)
Re: 2.6.23-rc8-mm2: OOPS in mmc on boot, Jens Axboe, (Thu Oct 4, 5:30 am)
Re: 2.6.23-rc8-mm2: OOPS in mmc on boot, Pierre Ossman, (Thu Oct 4, 6:24 am)
Re: 2.6.23-rc8-mm2: OOPS in mmc on boot, Jens Axboe, (Thu Oct 4, 6:38 am)
Re: 2.6.23-rc8-mm2: OOPS in mmc on boot, Pierre Ossman, (Thu Oct 4, 6:46 am)
Re: 2.6.23-rc8-mm2: OOPS in mmc on boot, Jens Axboe, (Thu Oct 4, 6:59 am)