diff options
author | Eric Covener <covener@apache.org> | 2016-09-02 18:46:35 +0000 |
---|---|---|
committer | Eric Covener <covener@apache.org> | 2016-09-02 18:46:35 +0000 |
commit | 0e6bd3b14368d725d4327894d43b5d7b5e4ea43d (patch) | |
tree | 3af52ff1f58fe4d6ca5fbeaa403d283e3c09f288 | |
parent | f029ca9595ace18cb3e5bd3cb3b0794e39c1ea38 (diff) | |
download | apr-0e6bd3b14368d725d4327894d43b5d7b5e4ea43d.tar.gz |
clear the aiocb structure used for asyncio cancel
The underlying syscall sanity checks some fields we don't later specify,
possibly even some fields that are n/a for a cancel operation,
which may result in a cancel call failing.
outstanding aysnc I/O requests are cancelled when the fd is closed,
but with very long-lived sockets, failing cancels could result
in elevated CPU during BP4XAIO of type select or cancel.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1759009 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | poll/unix/z_asio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/poll/unix/z_asio.c b/poll/unix/z_asio.c index 6da4ee8e9..ae03079fb 100644 --- a/poll/unix/z_asio.c +++ b/poll/unix/z_asio.c @@ -483,7 +483,8 @@ static apr_status_t asio_pollset_remove(apr_pollset_t *pollset, asio_elem_t *elem; apr_status_t rv = APR_SUCCESS; apr_pollset_private_t *priv = pollset->p; - struct aiocb cancel_a; /* AIO_CANCEL is synchronous, so autodata works fine */ + /* AIO_CANCEL is synchronous, so autodata works fine. */ + struct aiocb cancel_a = {0}; int fd; |