public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH next] bio: zero inlined bio_vec
@ 2008-12-23  1:08 Hugh Dickins
  2008-12-23  8:07 ` Jens Axboe
  0 siblings, 1 reply; 7+ messages in thread
From: Hugh Dickins @ 2008-12-23  1:08 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Andrew Morton, Stephen Rothwell, linux-kernel

bvec_alloc_bs() zeroes its bio_vec, and at least __blk_queue_bounce()
relies upon that: therefore bio_alloc_bioset() must zero the inlined
bio_vec - without that, lots of nastiness occurs in bounce_end_io and
blk_rq_map_sg and other places when booting up my PAE box.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
---

 fs/bio.c |    2 ++
 1 file changed, 2 insertions(+)

--- linux-next/fs/bio.c	2008-12-21 20:49:25.000000000 +0000
+++ fixed/fs/bio.c	2008-12-22 21:10:06.000000000 +0000
@@ -324,6 +324,8 @@ struct bio *bio_alloc_bioset(gfp_t gfp_m
 			if (nr_iovecs <= BIO_INLINE_VECS) {
 				idx = 0;
 				bvl = bio->bi_inline_vecs;
+				memset(bvl, 0, BIO_INLINE_VECS *
+							sizeof(struct bio_vec));
 				nr_iovecs = BIO_INLINE_VECS;
 			} else {
 				bvl = bvec_alloc_bs(gfp_mask, nr_iovecs, &idx,

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-12-23 11:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-23  1:08 [PATCH next] bio: zero inlined bio_vec Hugh Dickins
2008-12-23  8:07 ` Jens Axboe
2008-12-23 10:15   ` Hugh Dickins
2008-12-23 10:23     ` Jens Axboe
2008-12-23 10:31       ` Jens Axboe
2008-12-23 11:21         ` Hugh Dickins
2008-12-23 11:39           ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox