mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Haverkamp <markh@osdl.org>
To: Jens Axboe <axboe@suse.de>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Fix panic in 2.6 with bounced bio and dm
Date: Fri, 25 Feb 2005 09:13:12 -0800	[thread overview]
Message-ID: <1109351592.5014.13.camel@markh1.pdx.osdl.net> (raw)
In-Reply-To: <1109351021.5014.10.camel@markh1.pdx.osdl.net>

On Fri, 2005-02-25 at 09:03 -0800, Mark Haverkamp 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.
> 
> Mark.

I forgot a signed-off-by

Signed-off-by Mark Haverkamp <markh@osdl.org>


===== 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>


  reply	other threads:[~2005-02-25 17:15 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 [this message]
2005-02-26  0:19 ` Andrew Morton
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=1109351592.5014.13.camel@markh1.pdx.osdl.net \
    --to=markh@osdl.org \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.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®