[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0705131235490.3212@alien.or.mcafeemobile.com>
Date: Sun, 13 May 2007 12:37:26 -0700 (PDT)
From: Davide Libenzi <davidel@...ilserver.org>
To: Andrew Morton <akpm@...ux-foundation.org>
cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [patch 1/2] fix epoll single pass code and add wait-exclusive
flag ...
On Sun, 13 May 2007, Andrew Morton wrote:
> On Fri, 11 May 2007 19:30:31 -0700 Davide Libenzi <davidel@...ilserver.org> wrote:
>
> > Fixes the epoll single pass code. During the unlocked event delivery
> > (to userspace) code, the poll callback can re-issue new events, and
> > we must receive them correctly. Since we loop in a lockless fashion,
> > we want to be O(nready), and we don't want to flash on/off the spinlock
> > for every event, we have the poll callback to use a secondary list to
> > queue events while we're inside the event delivery loop.
> > The rw_semaphore has been turned into a mutex.
> > This patch also adds the wait-exclusive flag, as suggested by Davi Arnaut.
> >
> > ...
> > @@ -534,6 +547,8 @@
> > }
> >
> > mutex_unlock(&epmutex);
> > +
> > + mutex_destroy(&ep->mtx);
> > }
>
> It's a little alarming to see a dereference of `ep' right at the end of a
> function called ep_free(ep).
>
> Code is OK, but perhaps the kfree(ep) should be moved into ep_free()?
Ok, will do.
- Davide
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists