lkml.org 
[lkml]   [2007]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@xmailserver.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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-05-13 21:39    [W:0.174 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site