From: Christophe Saout <christophe@saout.de>
To: device-mapper development <dm-devel@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Alasdair G Kergon <agk@redhat.com>
Subject: Re: [PATCH 0/3] Fix SMP races in dm-crypt
Date: Thu, 22 Mar 2007 21:28:16 +0100 [thread overview]
Message-ID: <1174595296.2458.13.camel@leto.intern.saout.de> (raw)
In-Reply-To: <200703210806.30499.okir@lst.de>
Hi Olaf,
> (I'm resending this, because it seems mailman ate this posting
> the first time around - apologies if you're seeing this twice).
>
> I investigated kernel Bug 5948 (Oops when accessing SATA with device mapper on
> AMD 64 X2) to help cut down on the number of open bugs.
>
> The problem reported in that bug seems to be caused by memory pressure
> when writing - crypt_alloc_buffer can return less than the full number of
> pages required. In that case, the bio is split, but we're keeping a pointer
> to the first chunk of the request around in first_clone, and copy it. If the
> first clone completes I/O while we're cloning it, we oops on garbage in
> the bvec.
>
> I was able to reproduce this on 2.6.20 - and the following patches
> seem to fix it for me.
>
> dm-crypt-clone_init-early
> We need to call clone_init early on, before we can conceivably
> ever call bio_put on the clone
>
> dm-crypt-clone-race
> Do no access bios after generic_make_request
>
> dm-crypt-drop-first_clone
> Drop the first_clone business, and always allocate a fresh bio.
I fully agree. I didn't notice when the sharing of the bvec went away,
but it's no longer needed and the code is simpler. As for the other two
- ouch, you're right.
Thanks for investigating fixing these things.
All four patches are
Acked-By: Christophe Saout <christophe@saout.de>
next prev parent reply other threads:[~2007-03-22 20:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-21 7:06 [PATCH 0/3] Fix SMP races in dm-crypt Olaf Kirch
2007-03-21 10:03 ` Alasdair G Kergon
2007-03-21 10:47 ` [PATCH 4/3] Allocate smaller clones Olaf Kirch
2007-03-21 13:32 ` Re: [PATCH 0/3] Fix SMP races in dm-crypt Jim Meyering
2007-03-21 15:44 ` Alasdair G Kergon
2007-03-22 20:28 ` Christophe Saout [this message]
2007-03-22 20:41 ` Andrew Morton
2007-03-22 20:51 ` Christophe Saout
2007-03-22 21:53 ` Alasdair G Kergon
2007-03-22 22:44 ` Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2007-03-20 19:54 Olaf Kirch
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=1174595296.2458.13.camel@leto.intern.saout.de \
--to=christophe@saout.de \
--cc=agk@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dm-devel@redhat.com \
/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.