lkml.org 
[lkml]   [2002]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 2.5.46: epoll_wait can return too many events
On Wed, 6 Nov 2002, Jay Vosburgh wrote:

>
> The logic in fs/eventpoll.c:ep_events_transfer() to bundle events can
> return more than the requested number of events (because the event count is
> only incremented for each bundle); this will scribble on memory beyond the
> end of the user's buffer. The fix is to test against the bundle size
> (ebufcnt) plus the event count (eventcnt).
>
> Also, passing maxevents <= 0 to epoll_wait() causes the system to
> lock up; the fix is to return EINVAL if maxevents is <= 0.

Thanks Jay. Got it.
Linus please drop 0.32, I'll make 0.33 right now ...



- 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: 2005-03-22 13:30    [W:0.020 / U:1.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site