From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6468 invoked by alias); 1 Sep 2007 10:38:56 -0000 Received: (qmail 6456 invoked by uid 22791); 1 Sep 2007 10:38:56 -0000 X-Spam-Check-By: sourceware.org Received: from londo.lunn.ch (HELO londo.lunn.ch) (80.238.139.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 01 Sep 2007 10:38:50 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1IRQND-0005ec-00; Sat, 01 Sep 2007 12:38:39 +0200 Date: Sat, 01 Sep 2007 10:38:00 -0000 From: Andrew Lunn To: John Mills Cc: eCos Users , Rick Davis Message-ID: <20070901103839.GA18291@lunn.ch> Mail-Followup-To: John Mills , eCos Users , Rick Davis References: <004701c7e990$9e57b8e0$db072aa0$@net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-11) X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] network problem X-SW-Source: 2007-09/txt/msg00004.txt.bz2 Hi Folks I've lost track of the different threads about memory leaks in the network stack. It seems like one of the leaks being talked about here was fixed a long time ago: 2003-07-28 Jay Foster * src/sys/kern/sockio.c: Fixed memory leak in accept() call. Do we still need locking in socreate()? socreate calls soalloc. That has a comment /* XXX race condition for reentrant kernel */. The actual problem is in zalloci which does not perform locking on the linked list of elements in the pool. We are re-entrant? socreate() is only called from bsd_socket(). bsd_socket() should only be called from socket(). socket() performs locking, depending on what synchronisation protocol is in use. bsd_tcpip has no synchronisation protocol, so two simultaneous calls to socket() could result in a race! Could somebody please submit a full patch for socreate. Are there any other issues left? Thanks Andrew -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss