Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 28 Oct 2002 18:52:20 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 28 Oct 2002 18:52:20 -0500 Received: from x35.xmailserver.org ([208.129.208.51]:11418 "EHLO x35.xmailserver.org") by vger.kernel.org with ESMTP id ; Mon, 28 Oct 2002 18:52:18 -0500 X-AuthUser: davidel@xmailserver.org Date: Mon, 28 Oct 2002 16:08:04 -0800 (PST) From: Davide Libenzi X-X-Sender: davide@blue1.dev.mcafeelabs.com To: John Gardiner Myers cc: Linux Kernel Mailing List , , Subject: Re: and nicer too - Re: [PATCH] epoll more scalable than poll In-Reply-To: <3DBDCC02.6060100@netscape.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 909 Lines: 32 On Mon, 28 Oct 2002, John Gardiner Myers wrote: > bert hubert wrote: > > >The interface is also lovely: > > > > > The code you wrote has the standard epoll race condition. If the file > descriptor 's' becomes readable before the call to sys_epoll_ctl, > sys_epoll_wait() will never return the socket. The connection will hang > and the file descriptor will effectively leak. > > As you have amply demonstrated, the current epoll API is error prone. > The API should be fixed to test the poll condition and, if necessary, > drop an event upon insertion to the set. So, please don't use : free((void *) rand()); free() is flawed !! Be warned !! - Davide - 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/