Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265839AbUFDSEk (ORCPT ); Fri, 4 Jun 2004 14:04:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265900AbUFDSEk (ORCPT ); Fri, 4 Jun 2004 14:04:40 -0400 Received: from mx1.redhat.com ([66.187.233.31]:56543 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S265839AbUFDSEb (ORCPT ); Fri, 4 Jun 2004 14:04:31 -0400 Date: Fri, 4 Jun 2004 11:04:14 -0700 From: Pete Zaitcev To: Ian Abbott Cc: linux-usb-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Memory leak in visor.c and ftdi_sio.c Message-Id: <20040604110414.4f6b407a.zaitcev@redhat.com> In-Reply-To: References: <40C08E6D.8080606@infosciences.com> Organization: Red Hat, Inc. X-Mailer: Sylpheed version 0.9.9 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 877 Lines: 22 On Fri, 04 Jun 2004 17:34:41 +0100 Ian Abbott wrote: > I made the original change to ftdi_sio.c to allocate the write urbs > and their transfer buffers dynamically (instead of using a > preallocated pool) and I copied that technique from visor.c! > > A related problem with the current implementation is that is easy to > run out of memory by running something similar to this: > > # cat /dev/zero > /dev/ttyUSB0 This begs the question why in the world you discarded the perfectly good code and went into the trouble of programming the dynamic allocation scheme (with the leak we just plugged). -- Pete - 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/