From: Milan Broz <mbroz@redhat.com>
To: Alasdair G Kergon <agk@redhat.com>
Cc: Chuck Ebbert <cebbert@redhat.com>,
Patrick McHardy <kaber@trash.net>,
Andrew Morton <akpm@linux-foundation.org>,
dm-devel@redhat.com, linux-kernel@vger.kernel.org,
"Jun'ichi Nomura" <j-nomura@ce.jp.nec.com>
Subject: Re: [2.6.23 PATCH 07/18] dm io: fix panic on large request
Date: Fri, 20 Jul 2007 17:07:31 +0200 [thread overview]
Message-ID: <46A0CFB3.1090004@redhat.com> (raw)
In-Reply-To: <469E305D.8060003@redhat.com>
Chuck Ebbert wrote:
>> [ 126.754204] BUG: unable to handle kernel NULL pointer dereference at
>> virtual address 00000000
>>
...
> mempool_free() was called with a NULL pool. That can't be good.
Yes, it is really not good :)
Bug http://bugzilla.kernel.org/show_bug.cgi?id=7388
Attached patch fixes this problem, fix needed for stable tree too,
this is not regression, just very old bug...
Milan
--
mbroz@redhat.com
--
From: Milan Broz <mbroz@redhat.com>
Flush workqueue before releasing bioset and mopools
in dm-crypt.
There can be finished but not yet released request.
Call chain causing oops:
run workqueue
dec_pending
bio_endio(...);
<remove device request - remove mempool>
mempool_free(io, cc->io_pool);
This usually happens when cryptsetup create temporary
luks mapping in the beggining of crypt device activation.
When dm-core calls destructor crypt_dtr, no new request
are possible.
Signed-off-by: Milan Broz <mbroz@redhat.com>
---
drivers/md/dm-crypt.c | 2 ++
1 file changed, 2 insertions(+)
Index: linux-2.6.22/drivers/md/dm-crypt.c
===================================================================
--- linux-2.6.22.orig/drivers/md/dm-crypt.c 2007-07-17 21:56:36.000000000 +0200
+++ linux-2.6.22/drivers/md/dm-crypt.c 2007-07-19 11:55:13.000000000 +0200
@@ -920,6 +920,8 @@ static void crypt_dtr(struct dm_target *
{
struct crypt_config *cc = (struct crypt_config *) ti->private;
+ flush_workqueue(_kcryptd_workqueue);
+
bioset_free(cc->bs);
mempool_destroy(cc->page_pool);
mempool_destroy(cc->io_pool);
prev parent reply other threads:[~2007-07-20 15:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-11 20:58 [2.6.23 PATCH 07/18] dm io: fix panic on large request Alasdair G Kergon
2007-07-17 13:16 ` Patrick McHardy
2007-07-17 16:39 ` Jun'ichi Nomura
2007-07-17 17:50 ` Patrick McHardy
2007-07-17 22:20 ` Jun'ichi Nomura
2007-07-18 10:08 ` Patrick McHardy
2007-07-18 15:23 ` Chuck Ebbert
2007-07-20 15:07 ` Milan Broz [this message]
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=46A0CFB3.1090004@redhat.com \
--to=mbroz@redhat.com \
--cc=agk@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=cebbert@redhat.com \
--cc=dm-devel@redhat.com \
--cc=j-nomura@ce.jp.nec.com \
--cc=kaber@trash.net \
--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