Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 25 Nov 2002 17:27:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 25 Nov 2002 17:27:56 -0500 Received: from x35.xmailserver.org ([208.129.208.51]:18057 "EHLO x35.xmailserver.org") by vger.kernel.org with ESMTP id ; Mon, 25 Nov 2002 17:27:55 -0500 X-AuthUser: davidel@xmailserver.org Date: Mon, 25 Nov 2002 14:36:03 -0800 (PST) From: Davide Libenzi X-X-Sender: davide@blue1.dev.mcafeelabs.com To: John Myers cc: linux-kernel Subject: Re: [rfc] new poll callback'd wake up hell ... In-Reply-To: <3DE29EB9.9050301@netscape.com> Message-ID: References: <3DE29EB9.9050301@netscape.com> 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: 784 Lines: 25 On Mon, 25 Nov 2002, John Myers wrote: > Davide Libenzi writes: > > 1) Move the wake_up() call done inside the poll callback outside the lock > > You can't. You need to hold the lock over the callback or your callback > could end up accessing a freed epitem. No, look at the code : http://www.xmailserver.org/linux-patches/sys_epoll-2.5.49-0.58.diff The function ep_collect_ready_items() increases the usage count under lock. So the epintem is protected, and the file* cannot desappear because of the read lock on epsem. - 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/