mirror of
https://github.com/nginx/nginx.git
synced 2025-06-09 02:42:48 +08:00
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.
This commit is contained in:
parent
b99492595c
commit
c09d65b179
@ -681,6 +681,8 @@ ngx_epoll_process_events(ngx_cycle_t *cycle, ngx_msec_t timer, ngx_uint_t flags)
|
|||||||
|
|
||||||
wev = c->write;
|
wev = c->write;
|
||||||
|
|
||||||
|
if ((revents & EPOLLOUT) && wev->active) {
|
||||||
|
|
||||||
if (c->fd == -1 || wev->instance != instance) {
|
if (c->fd == -1 || wev->instance != instance) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -693,8 +695,6 @@ ngx_epoll_process_events(ngx_cycle_t *cycle, ngx_msec_t timer, ngx_uint_t flags)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((revents & EPOLLOUT) && wev->active) {
|
|
||||||
|
|
||||||
if (flags & NGX_POST_THREAD_EVENTS) {
|
if (flags & NGX_POST_THREAD_EVENTS) {
|
||||||
wev->posted_ready = 1;
|
wev->posted_ready = 1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user