Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751373AbWHRN1q (ORCPT ); Fri, 18 Aug 2006 09:27:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751387AbWHRN1p (ORCPT ); Fri, 18 Aug 2006 09:27:45 -0400 Received: from py-out-1112.google.com ([64.233.166.182]:65186 "EHLO py-out-1112.google.com") by vger.kernel.org with ESMTP id S1751373AbWHRN1o (ORCPT ); Fri, 18 Aug 2006 09:27:44 -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=BRsOafb8o1Xc7xi/rooHf2K4bvFt1wFLsIvffQmwzr92U519fBoojoEAOvX6T7qUrRBlAuw9ud6KzFXiONaSxLSU9SsrxEHL2KRaxnFQbiRk12Syfj+9kptK5r1gPzq8SDeSSAYNufcYO5six2ik9XPK8SeQbeZVQrozEHLel9Q= Message-ID: Date: Fri, 18 Aug 2006 14:27:43 +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: <6bffcb0e0608180528ocadc36ck8868ae1a33342bb9@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_25122_11391705.1155907663840" References: <20060812215857.17709.79502.stgit@localhost.localdomain> <6bffcb0e0608130459k1c7e142esbfc2439badf323bd@mail.gmail.com> <6bffcb0e0608130726x8fc1c0v7717165a63391e80@mail.gmail.com> <6bffcb0e0608170745s8145df4ya4e946c76ab83c1b@mail.gmail.com> <6bffcb0e0608180528ocadc36ck8868ae1a33342bb9@mail.gmail.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 38027 Lines: 511 ------=_Part_25122_11391705.1155907663840 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 18/08/06, Michal Piotrowski wrote: > Something doesn't work. It appears while udev start. Could you try the attached patch? It has some improvements from the yesterday's one and also prints extra information when that error happens. Thanks. -- Catalin ------=_Part_25122_11391705.1155907663840 Content-Type: text/x-patch; name="new-locking.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="new-locking.patch" X-Attachment-Id: f_er0lkbvt ZGlmZiAtLWdpdCBhL21tL21lbWxlYWsuYyBiL21tL21lbWxlYWsuYwppbmRleCA1MTQyODBmLi5m ZmE0YmRkIDEwMDY0NAotLS0gYS9tbS9tZW1sZWFrLmMKKysrIGIvbW0vbWVtbGVhay5jCkBAIC0x Niw2ICsxNiwxOCBAQAogICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUg R05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UKICAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBp ZiBub3QsIHdyaXRlIHRvIHRoZSBGcmVlIFNvZnR3YXJlCiAgKiBGb3VuZGF0aW9uLCBJbmMuLCA1 OSBUZW1wbGUgUGxhY2UsIFN1aXRlIDMzMCwgQm9zdG9uLCBNQSAwMjExMS0xMzA3IFVTQQorICoK KyAqCisgKiBOb3RlcyBvbiBsb2NraW5nOiBrbWVtbGVhayBuZWVkcyB0byBhbGxvY2F0ZS9mcmVl IG1lbW9yeSBmb3IgaXRzCisgKiBvd24gZGF0YSBzdHJ1Y3R1cmVzIC0gdGhlIG1lbWxlYWtfcG9p bnRlciBhbmQgdGhlIHBvaW50ZXIgYW5kCisgKiBhbGlhc2VzIHJhZGl4IHRyZWVzLiBUaGUgbWVt bGVha19mcmVlIGhvb2sgY2FuIGJlIGNhbGxlZCBmcm9tCisgKiBtbS9zbGFiLmMgd2l0aCB0aGUg bGlzdF9sb2NrIGhlbGQgKGkuZS4gd2hlbiByZWxlYXNpbmcgb2Ygb2ZmLXNsYWIKKyAqIG1hbmFn ZW1lbnQgc3RydW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WJ1Zygia21lbWxlYWs6ICVk IHByZWluaXQgYWN0aW9uc1xuIiwgcHJlaW5pdF9wb3MpOwogCWZvciAoaSA9IDA7IGkgPCBwcmVp bml0X3BvczsgaSsrKSB7Cg== ------=_Part_25122_11391705.1155907663840-- - 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/