All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Olien <dmo@osdl.org>
To: syrius.ml@no-log.org
Cc: evms-devel@lists.sourceforge.net, dm-devel@redhat.com, agk@redhat.com
Subject: Re: dev kernels(bio change), evms_activate still produces oops
Date: Wed, 9 Feb 2005 15:10:44 -0800	[thread overview]
Message-ID: <20050209231044.GA959@osdl.org> (raw)
In-Reply-To: <87sm48dnh2.87r7jsdnh2@87pszcdnh2.message.id>


Sorry for being so slow.  Here's a patch that I believe will fix this oops.
Please give this a try and let me know.  The problem is that when I
coded up the new bio_clone() code, I made the bad assumption that the
bio passed in would have been allocated from a bio_set.  In the case
of raid5 and raid6, this isn't the case.  So, when raid5 passes one
of its bio's into the dm code, and dm tries to bio_clone() it,
bio_clone() dereferences a NULL pointer.

As a quick fix, this patch changes bio_clone() to just use the global
bio_set to allocate the new bio.  Problem is, this potentially sets
up another bio exhaustion case.  I'm thinking there should maybe
be a bio_clone_bioset() that accepts a bio_set pointer as an argument.
That way, dm could for example pass in it's own bio_set to allocate
from.

But for now, here's the quick patch.  Please give it a try and give
me the results.


diff -ur linux-2.6.11-rc3-bk4-udm1/fs/bio.c linux-2.6.11-rc3-bk4-udm1-patch/fs/bio.c
--- linux-2.6.11-rc3-bk4-udm1/fs/bio.c	2005-02-08 15:36:16.000000000 -0800
+++ linux-2.6.11-rc3-bk4-udm1-patch/fs/bio.c	2005-02-09 14:56:39.000000000 -0800
@@ -258,7 +258,7 @@
  */
 struct bio *bio_clone(struct bio *bio, int gfp_mask)
 {
-	struct bio *b = bio_alloc_bioset(gfp_mask, bio->bi_max_vecs, bio->bi_set);
+	struct bio *b = bio_alloc_bioset(gfp_mask, bio->bi_max_vecs, fs_bio_set);
 
 	if (b)
 		__bio_clone(b, bio);

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

  parent reply	other threads:[~2005-02-09 23:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-07 22:37 dev kernels(bio change), evms_activate still produces oops syrius.ml
2005-02-07 23:14 ` Dave Olien
2005-02-09 23:10 ` Dave Olien [this message]
2005-02-10  0:39   ` syrius.ml
2005-02-10  1:02     ` Dave Olien
2005-02-11 21:14   ` Re: [dm-devel] " Dave Olien
2005-02-16 22:56     ` Dave Olien
2005-02-17 14:17       ` A question Nicola Ranaldo
2005-02-17 19:58       ` [Evms-devel] Re: dev kernels(bio change), evms_activate still produces oops syrius.ml

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=20050209231044.GA959@osdl.org \
    --to=dmo@osdl.org \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=evms-devel@lists.sourceforge.net \
    --cc=syrius.ml@no-log.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.