Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

pbulk-base-0.39:

Fix ordering of event handler vs queue modification. This can result in
queue corruption or use after free when the master can't handle a
request before the next arrives. From Matt Dillon.
  • Loading branch information...
commit 9e24fcf83346d2ccd1504eee9a7584693d65b43e 1 parent 3d6c2f8
joerg authored
View
4 pkgtools/pbulk-base/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.1 2009/06/07 18:07:00 joerg Exp $
+# $NetBSD: Makefile,v 1.2 2009/08/23 18:02:04 joerg Exp $
-DISTNAME= pbulk-base-0.38
+DISTNAME= pbulk-base-0.39
COMMENT= Core components of the modular bulk build framework
PKG_DESTDIR_SUPPORT= user-destdir
View
4 pkgtools/pbulk/files/pbulk/lib/event.c
@@ -1,4 +1,4 @@
-/* $NetBSD: event.c,v 1.5 2009/02/25 19:31:53 joerg Exp $ */
+/* $NetBSD: event.c,v 1.6 2009/08/23 18:02:04 joerg Exp $ */
/*-
* Copyright (c) 2007, 2009 Joerg Sonnenberger <joerg@NetBSD.org>.
@@ -348,11 +348,11 @@ event_dispatch(void)
iter < last_iter && ev && (next = LIST_NEXT(ev, ev_link), 1);
ev = next, ++iter) {
if (iter->revents) {
- (*ev->ev_handler)(ev->ev_fd, ev->ev_arg);
if (!ev->ev_persistent) {
--active_events;
LIST_REMOVE(ev, ev_link);
}
+ (*ev->ev_handler)(ev->ev_fd, ev->ev_arg);
--ret;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.