]> git.hungrycats.org Git - linux/commit
[PATCH] dm and bounce buffer panic fix
authorAndrew Morton <akpm@osdl.org>
Mon, 29 Dec 2003 13:49:20 +0000 (05:49 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 29 Dec 2003 13:49:20 +0000 (05:49 -0800)
commit85734c4777ef9ea13f46fcc5d666b4e662197878
treeb8dada0b9dc3140ba58175e9c3f883b8cd1d5402
parent9907e7365cfaad37e83a31fa275b9841cf6da279
[PATCH] dm and bounce buffer panic fix

From: Mark Haverkamp <markh@osdl.org>

About three weeks ago markw at osdl posted a mail about a panic that he
was seeing:

http://marc.theaimsgroup.com/?l=linux-kernel&m=106737176716474&w=2

I believe what is happening, is that the dm __clone_and_map function is
generating bio structures with the bi_idx field non-zero.  When
__blk_queue_bounce creates a new bio with bounce pages, it sets the bi_idx
field to 0 rather than the bi_idx of the original.  This causes trouble since
bv_page pointers will be dereferenced later that are zero.  The following
uses the original bio structure's bi_idx in the new bio structure and in
copy_to_high_bio_irq and bounce_end_io.

This has cleared up the panic when using the volume.

(acked by Joe Thornber)
mm/highmem.c