Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932478AbWHQV63 (ORCPT ); Thu, 17 Aug 2006 17:58:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932468AbWHQV62 (ORCPT ); Thu, 17 Aug 2006 17:58:28 -0400 Received: from py-out-1112.google.com ([64.233.166.182]:41067 "EHLO py-out-1112.google.com") by vger.kernel.org with ESMTP id S932376AbWHQV61 (ORCPT ); Thu, 17 Aug 2006 17:58:27 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=VaBGV7OAllgeJp3ievFciO8Q2xLqr5m3q/Jvtk53oifIOK8qzK6mzlYRKnl13ZaNPfPFiww+nh6zQlXYl2tq0KWCoLCGATAHACR78Gv/U3SGb2rhVaYrC509yO2vJ9Ad62vz3N9U22vyJw1n4N4qrlIjHu5drRUKCWUM15SlGP4= Message-ID: Date: Thu, 17 Aug 2006 22:58:26 +0100 From: "Catalin Marinas" To: "Michal Piotrowski" Subject: Re: [PATCH 2.6.18-rc4 00/10] Kernel memory leak detector 0.9 Cc: linux-kernel@vger.kernel.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_14343_1752537.1155851906852" References: <20060812215857.17709.79502.stgit@localhost.localdomain> <6bffcb0e0608130459k1c7e142esbfc2439badf323bd@mail.gmail.com> <6bffcb0e0608130726x8fc1c0v7717165a63391e80@mail.gmail.com> <6bffcb0e0608170745s8145df4ya4e946c76ab83c1b@mail.gmail.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 36720 Lines: 499 ------=_Part_14343_1752537.1155851906852 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 17/08/06, Catalin Marinas wrote: > On 17/08/06, Michal Piotrowski wrote: > > On 17/08/06, Catalin Marinas wrote: > > > On 13/08/06, Michal Piotrowski wrote: > > > > It's kmemleak 0.9 issue. I have tested kmemleak 0.8 on 2.6.18-rc1and > > > > 2.6.18-rc2. I haven't seen this before. > > > > > > it looks like it was caused by commit > > > fc818301a8a39fedd7f0a71f878f29130c72193d where free_block() now calls > > > slab_destroy() with l3->list_lock held. > > > > I'll revert this commit. > > I'm not sure it's a good idea, it might have other implications in > slab.c. I better fix kmemleak (I think currently you could get a > deadlock only on SMP). I attach a patch for kmemleak-0.9 which seems to work for me. It has a new locking mechanism in that memory allocations are performed without memleak_lock held. Let me know if you still get errors (I haven't fully tested it yet). Thanks. -- Catalin ------=_Part_14343_1752537.1155851906852 Content-Type: text/x-patch; name=new-locking.patch; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: base64 X-Attachment-Id: f_eqzocr8b Content-Disposition: attachment; filename="new-locking.patch" ZGlmZiAtLWdpdCBhL2xpYi9LY29uZmlnLmRlYnVnIGIvbGliL0tjb25maWcuZGVidWcKZGlmZiAt LWdpdCBhL21tL21lbWxlYWsuYyBiL21tL21lbWxlYWsuYwppbmRleCA1MTQyODBmLi4xYmVhMzYy IDEwMDY0NAotLS0gYS9tbS9tZW1sZWFrLmMKKysrIGIvbW0vbWVtbGVhay5jCkBAIC0xNiw2ICsx NiwxOCBAQAogICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdl bmVyYWwgUHVibGljIExpY2Vuc2UKICAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3Qs IHdyaXRlIHRvIHRoZSBGcmVlIFNvZnR3YXJlCiAgKiBGb3VuZGF0aW9uLCBJbmMuLCA1OSBUZW1w bGUgUGxhY2UsIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAwMjExMS0xMzA3IFVTQQorICoKKyAqCisg KiBOb3RlcyBvbiBsb2NraW5nOiBrbWVtbGVhayBuZWVkcyB0byBhbGxvY2F0ZS9mcmVlIG1lbW9y eSBmb3I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NkYXRhLCBf ZWRhdGEpOwpAQCAtMTI2Miw2ICsxNDY0LDEwIEBAIHZvaWQgX19pbml0IG1lbWxlYWtfaW5pdCh2 b2lkKQogCiAJYXRvbWljX3NldCgmbWVtbGVha19pbml0aWFsaXplZCwgMSk7CiAKKwlpZiAocHJl aW5pdF9wb3MgPj0gUFJFSU5JVF9QT0lOVEVSUykKKwkJcGFuaWMoImttZW1sZWFrOiBwcmVpbml0 IHBvaW50ZXJzIGJ1ZmZlciBvdmVyZmxvdzogJWRcbiIsCisJCSAgICAgIHByZWluaXRfcG9zKTsK KwogCS8qIGV4ZWN1dGUgdGhlIGJ1ZmZlcmVkIG1lbWxlYWsgYWN0aW9ucyAqLwogCXByX2RlYnVn KCJrbWVtbGVhazogJWQgcHJlaW5pdCBhY3Rpb25zXG4iLCBwcmVpbml0X3Bvcyk7CiAJZm9yIChp ID0gMDsgaSA8IHByZWluaXRfcG9zOyBpKyspIHsK ------=_Part_14343_1752537.1155851906852-- - 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/