Re: [patch 1/2] fix epoll single pass code and add wait-exclusive flag ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 13 May 2007, Andrew Morton wrote:

> On Fri, 11 May 2007 19:30:31 -0700 Davide Libenzi <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux