Commit 774009ed authored by Kristian Lyngstøl's avatar Kristian Lyngstøl

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.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4476 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent f6f30f9f
......@@ -234,6 +234,15 @@ SES_Delete(struct sess *sp)
// 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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment