r4476 - trunk/varnish-cache/bin/varnishd
kristian at projects.linpro.no
kristian at projects.linpro.no
Wed Jan 20 19:12:19 CET 2010
Author: kristian
Date: 2010-01-20 19:12:19 +0100 (Wed, 20 Jan 2010)
New Revision: 4476
Modified:
trunk/varnish-cache/bin/varnishd/cache_session.c
Log:
Zero the epoll data.ptr on SES_Delete
As of r4456, the sm-structure isn't zeroed. This confused the epoll-waiter
which relied on ev.data.ptr to be NULL.
Modified: trunk/varnish-cache/bin/varnishd/cache_session.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_session.c 2010-01-20 12:26:29 UTC (rev 4475)
+++ trunk/varnish-cache/bin/varnishd/cache_session.c 2010-01-20 18:12:19 UTC (rev 4476)
@@ -234,6 +234,15 @@
// sm->magic = SESSMEM_MAGIC;
// sm->workspace = workspace;
+ /* XXX: cache_waiter_epoll.c evaluates data.ptr. If it's
+ * XXX: not nulled, things go wrong during load.
+ * XXX: Should probably find a better method to deal with
+ * XXX: this scenario...
+ */
+#if defined(HAVE_EPOLL_CTL)
+ sm->sess.ev.data.ptr = NULL;
+#endif
+
Lck_Lock(&ses_mem_mtx);
VTAILQ_INSERT_HEAD(&ses_free_mem[1 - ses_qp], sm, list);
Lck_Unlock(&ses_mem_mtx);
More information about the varnish-commit
mailing list