Klaus Demo nginx / c09d65b
Fixed AIO on Linux, broken in r4306. Events from eventfd do not have c->write set, and the stale event check added in r4306 causes null pointer dereference. Maxim Dounin 10 years ago
1 changed file(s) with 12 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
680680
681681 wev = c->write;
682682
683 if (c->fd == -1 || wev->instance != instance) {
684
685 /*
686 * the stale event from a file descriptor
687 * that was just closed in this iteration
688 */
689
690 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
691 "epoll: stale event %p", c);
692 continue;
693 }
694
695683 if ((revents & EPOLLOUT) && wev->active) {
684
685 if (c->fd == -1 || wev->instance != instance) {
686
687 /*
688 * the stale event from a file descriptor
689 * that was just closed in this iteration
690 */
691
692 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
693 "epoll: stale event %p", c);
694 continue;
695 }
696696
697697 if (flags & NGX_POST_THREAD_EVENTS) {
698698 wev->posted_ready = 1;