diff options
author | covener <covener@13f79535-47bb-0310-9956-ffa450edef68> | 2016-09-02 18:47:51 +0000 |
---|---|---|
committer | covener <covener@13f79535-47bb-0310-9956-ffa450edef68> | 2016-09-02 18:47:51 +0000 |
commit | 7948d7f682f2f65e85b117f535b6e857f5982eda (patch) | |
tree | bb8976147a85763794b0b6d632282ee8516e9feb | |
parent | 5bfb58745b23be8152e00c98fd5d44df16001d32 (diff) | |
download | libapr-7948d7f682f2f65e85b117f535b6e857f5982eda.tar.gz |
Merge r1759009 from trunk:
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: http://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1759011 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; |