Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751499AbWHRVrV (ORCPT ); Fri, 18 Aug 2006 17:47:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751502AbWHRVrV (ORCPT ); Fri, 18 Aug 2006 17:47:21 -0400 Received: from py-out-1112.google.com ([64.233.166.180]:63688 "EHLO py-out-1112.google.com") by vger.kernel.org with ESMTP id S1751499AbWHRVrT (ORCPT ); Fri, 18 Aug 2006 17:47:19 -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=b7AixZOWX64nexxO3PVQ1cv4gju2FanI+cGimmaiGYdrHfRNTqIgvy3wGGnJnlAeJB5CVS9jwSFhnbv5mxvsbC1KeuyNXizjxU/LJdYI3IOsmdBfJIFxL1zgaTYMqRFHE15GuvPQUIRjGOtZi+Bvvqgjslii0dyd5a5SkdAg188= Message-ID: Date: Fri, 18 Aug 2006 22:47:18 +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: <6bffcb0e0608181438m3406de08q9a168d486127aef@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_35814_14599875.1155937638711" References: <20060812215857.17709.79502.stgit@localhost.localdomain> <6bffcb0e0608180528ocadc36ck8868ae1a33342bb9@mail.gmail.com> <6bffcb0e0608180655j50332247m8ed393c37d570ee4@mail.gmail.com> <6bffcb0e0608180715v27015481vb7c603c4be356a21@mail.gmail.com> <6bffcb0e0608180942l12e342epd60dffbb5c5d4b3e@mail.gmail.com> <6bffcb0e0608181438m3406de08q9a168d486127aef@mail.gmail.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 38666 Lines: 520 ------=_Part_35814_14599875.1155937638711 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 18/08/06, Michal Piotrowski wrote: > cat /sys/kernel/debug/memleak + LTP + patching repo = oops? > > BUG: unable to handle kernel paging request at virtual address 6b6b6b6b I got this as well today on an 4-CPU ARM platform. I changed some list traversal to the RCU variants but forgot to change the list_del/add. I attach another patch which fixes this (haven't tested it extensively yet). Thanks. -- Catalin ------=_Part_35814_14599875.1155937638711 Content-Type: text/x-patch; name="new-locking.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="new-locking.patch" X-Attachment-Id: f_er13cwgc ZGlmZiAtLWdpdCBhL21tL21lbWxlYWsuYyBiL21tL21lbWxlYWsuYwppbmRleCA1MTQyODBmLi43 ZDZjMWYzIDEwMDY0NAotLS0gYS9tbS9tZW1sZWFrLmMKKysrIGIvbW0vbWVtbGVhay5jCkBAIC0x Niw2ICsxNiwxOCBAQAogICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUg R05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UKICAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBp ZiBub3QsIHdyaXRlIHRvIHRoZSBGcmVlIFNvZnR3YXJlCiAgKiBGb3VuZGF0aW9uLCBJbmMuLCA1 OSBUZW1wbGUgUGxhY2UsIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAwMjExMS0xMzA3IFVTQQorICoK KyAqCisgKiBOb3RlcyBvbiBsb2NraW5nOiBrbWVtbGVhayBuZWVkcyB0byBhbGxvY2F0ZS9mcmVl IG1lbW9yeSBmb3IgaXRzCisgKiBvd24gZGF0YSBzdHJ1Y3R1cmVzIC0gdGhlIG1lbWxlYWtfcG9p bnRlciBhbmQgdGhlIHBvaW50ZXIgYW5kCisgKiBhbGlhc2VzIHJhZGl4IHRyZWVzLiBUaGUgbWVt bGVha19mcmVlIGhvb2sgY2FuIGJlIGNhbGxlZCBmcm9tCisgKiBtbS9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r X2xvY2ssIGZsYWdzKTsKKwlwdXRfY3B1X25vX3Jlc2NoZWQoKTsKKwlsb2NhbF9pcnFfcmVzdG9y ZShmbGFncyk7CiAKIAkvKiBkYXRhL2JzcyBzY2FubmluZyAqLwogCXNjYW5fYmxvY2soX3NkYXRh LCBfZWRhdGEpOwpAQCAtMTI2Miw2ICsxNTAyLDEwIEBAIHZvaWQgX19pbml0IG1lbWxlYWtfaW5p dCh2b2lkKQogCiAJYXRvbWljX3NldCgmbWVtbGVha19pbml0aWFsaXplZCwgMSk7CiAKKwlpZiAo cHJlaW5pdF9wb3MgPj0gUFJFSU5JVF9QT0lOVEVSUykKKwkJcGFuaWMoImttZW1sZWFrOiBwcmVp bml0IHBvaW50ZXJzIGJ1ZmZlciBvdmVyZmxvdzogJWRcbiIsCisJCSAgICAgIHByZWluaXRfcG9z KTsKKwogCS8qIGV4ZWN1dGUgdGhlIGJ1ZmZlcmVkIG1lbWxlYWsgYWN0aW9ucyAqLwogCXByX2Rl YnVnKCJrbWVtbGVhazogJWQgcHJlaW5pdCBhY3Rpb25zXG4iLCBwcmVpbml0X3Bvcyk7CiAJZm9y IChpID0gMDsgaSA8IHByZWluaXRfcG9zOyBpKyspIHsK ------=_Part_35814_14599875.1155937638711-- - 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/