Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 7 Nov 2000 18:09:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 7 Nov 2000 18:09:37 -0500 Received: from boss.staszic.waw.pl ([195.205.163.66]:39439 "EHLO boss.staszic.waw.pl") by vger.kernel.org with ESMTP id ; Tue, 7 Nov 2000 18:09:30 -0500 Date: Wed, 8 Nov 2000 00:09:38 +0100 (CET) From: Bartlomiej Zolnierkiewicz To: linux-kernel@vger.kernel.org cc: torvalds@transmeta.com Subject: [PATCH] Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1578824213-973638578=:1628" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --8323328-1578824213-973638578=:1628 Content-Type: TEXT/PLAIN; charset=US-ASCII I hitted few items from Dawson Engler's list of potential kmalloc/kfree bugs... -- Bartlomiej Zolnierkiewicz --8323328-1578824213-973638578=:1628 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="kmkf-bugs-1.diff" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="kmkf-bugs-1.diff" LS0tIGxpbnV4LTI0MHQxMC9kcml2ZXJzL2lkZS9pZGUtcHJvYmUuYwlUdWUg T2N0ICAzIDAwOjE2OjUxIDIwMDANCisrKyBsaW51eC9kcml2ZXJzL2lkZS9p ZGUtcHJvYmUuYwlUdWUgTm92ICA3IDAwOjI1OjM1IDIwMDANCkBAIC02NTIs NiArNjUzLDEwIEBADQogCQlod2dyb3VwID0gbWF0Y2gtPmh3Z3JvdXA7DQog CX0gZWxzZSB7DQogCQlod2dyb3VwID0ga21hbGxvYyhzaXplb2YoaWRlX2h3 Z3JvdXBfdCksIEdGUF9LRVJORUwpOw0KKwkJaWYoIWh3Z3Jvd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ogCXNobi0+bmFtZVtobmFtZV9sZW5dID0gMDsNCi0tLSBsaW51 eC0yNDB0MTAvZHJpdmVycy9zY3NpL2lwcy5jCVR1ZSBPY3QgIDMgMTQ6Mjc6 NDUgMjAwMA0KKysrIGxpbnV4L2RyaXZlcnMvc2NzaS9pcHMuYwlNb24gTm92 ICA2IDIzOjQ4OjIyIDIwMDANCkBAIC00NTUyLDYgKzQ1NTIsOCBAQA0KIA0K ICAgIC8qIEFsbG9jYXRlIG1lbW9yeSBmb3IgdGhlIENDQnMgKi8NCiAgICBo YS0+c2NicyA9IChpcHNfc2NiX3QgKikga21hbGxvYyhoYS0+bWF4X2NtZHMg KiBzaXplb2YoaXBzX3NjYl90KSwgR0ZQX0FUT01JQ3xHRlBfRE1BKTsNCisg ICBpZighaGEtPnNjYnMpDQorICAgICAgcmV0dXJuIDA7DQogDQogICAgbWVt c2V0KGhhLT5zY2JzLCAwLCBoYS0+bWF4X2NtZHMgKiBzaXplb2YoaXBzX3Nj Yl90KSk7DQogDQo= --8323328-1578824213-973638578=:1628-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/