apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1759009 - /apr/apr/trunk/poll/unix/z_asio.c
Date Fri, 02 Sep 2016 18:46:35 GMT
Author: covener
Date: Fri Sep  2 18:46:35 2016
New Revision: 1759009

URL: http://svn.apache.org/viewvc?rev=1759009&view=rev
Log:
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.


Modified:
    apr/apr/trunk/poll/unix/z_asio.c

Modified: apr/apr/trunk/poll/unix/z_asio.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/poll/unix/z_asio.c?rev=1759009&r1=1759008&r2=1759009&view=diff
==============================================================================
--- apr/apr/trunk/poll/unix/z_asio.c (original)
+++ apr/apr/trunk/poll/unix/z_asio.c Fri Sep  2 18:46:35 2016
@@ -483,7 +483,8 @@ static apr_status_t asio_pollset_remove(
     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;
 



Mime
View raw message