Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936636AbXHGVJy (ORCPT ); Tue, 7 Aug 2007 17:09:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S935777AbXHGUxk (ORCPT ); Tue, 7 Aug 2007 16:53:40 -0400 Received: from pentafluge.infradead.org ([213.146.154.40]:59494 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935755AbXHGUxi (ORCPT ); Tue, 7 Aug 2007 16:53:38 -0400 Date: Tue, 7 Aug 2007 13:47:08 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org, torvalds@linux-foundation.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, christophe@saout.de, kaber@trash.net, agk@redhat.com, mbroz@redhat.com Subject: [2.6.22.2 review 45/84] dm io: fix panic on large request Message-ID: <20070807204708.GU23028@kroah.com> References: <20070807204034.882009319@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="dm-io-fix-panic-on-large-request.patch" In-Reply-To: <20070807204157.GA23028@kroah.com> User-Agent: Mutt/1.5.15 (2007-04-06) X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject. Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1461 Lines: 49 From: Milan Broz 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(...); 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 Cc: Chuck Ebbert Cc: Patrick McHardy Acked-by: Alasdair G Kergon Cc: Christophe Saout Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/md/dm-crypt.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -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); -- - 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/