mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Mark Haverkamp <markh@osdl.org>
Cc: axboe@suse.de, linux-kernel@vger.kernel.org, dm-devel@redhat.com
Subject: Re: [PATCH] Fix panic in 2.6 with bounced bio and dm
Date: Fri, 25 Feb 2005 16:19:47 -0800	[thread overview]
Message-ID: <20050225161947.5fd6d343.akpm@osdl.org> (raw)
In-Reply-To: <1109351021.5014.10.camel@markh1.pdx.osdl.net>

Mark Haverkamp <markh@osdl.org> wrote:
>
> 
> 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.
> 

Thanks, we should get fixed for 2.6.11.

It seems very weird for dm to be shoving NULL page*'s into the middle of a
bio's bvec array, so your fix might end up being a workaround pending a
closer look at what's going on in there.

> 
> ===== 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)
>  			continue;
>  
>  		mempool_free(bvec->bv_page, pool);	
> 
> -- 
> Mark Haverkamp <markh@osdl.org>
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  parent reply	other threads:[~2005-02-26  0:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-25 17:03 Mark Haverkamp
2005-02-25 17:13 ` Mark Haverkamp
2005-02-26  0:19 ` Andrew Morton [this message]
2005-02-26  0:40   ` Linus Torvalds
2005-02-26 12:39     ` Jens Axboe
2005-02-28 15:32       ` Mark Haverkamp
2005-02-28 15:43         ` Mark Haverkamp
2005-02-28 15:51         ` Jens Axboe
2005-02-28 16:13           ` Mark Haverkamp
2005-02-28 16:15             ` Mark Haverkamp
2005-02-28 16:21             ` Jens Axboe
2005-02-28 17:35           ` Dave Olien
2005-02-28 17:40             ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050225161947.5fd6d343.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=axboe@suse.de \
    --cc=dm-devel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markh@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®