[lkml]   [2005]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH] Fix panic in 2.6 with bounced bio and dm

    Last September a fix was checked in for a memory leak problem in
    bounce_end_io causing the entire bio to be checked. This ended up
    causing some dm cloned bios that had bounce buffers to free NULL pages
    because their bi_idx can be non-zero. This patch skips NULL pages in
    the bio's bio_vec. I'm not sure if this is the most optimal fix but I
    think that it is safe since bvec_alloc memsets the bio_vec to zero.


    ===== mm/highmem.c 1.55 vs edited =====
    --- 1.55/mm/highmem.c 2005-01-07 21:44:13 -08:00
    +++ edited/mm/highmem.c 2005-02-25 07:54:21 -08:00
    @@ -319,7 +319,7 @@
    __bio_for_each_segment(bvec, bio, i, 0) {
    org_vec = bio_orig->bi_io_vec + i;
    - if (bvec->bv_page == org_vec->bv_page)
    + if (!bvec->bv_page || bvec->bv_page == org_vec->bv_page)

    mempool_free(bvec->bv_page, pool);
    Mark Haverkamp <>

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:10    [W:0.044 / U:4.140 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site