• Andrew Morton's avatar
    [PATCH] dm and bounce buffer panic fix · 85734c47
    Andrew Morton authored
    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)
    85734c47
highmem.c 13.3 KB