1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00
Files
apache/modules/cache
Yann Ylavic 0e382d189d Merge r1888266 from trunk:
mod_socache_shmcb: be safe from socache_shmcb_destroy() late call.  PR 59798.

ssl_init_Module() in post_config early registers ssl_init_ModuleKill(), which
will then run after all the next cleanups registered later in post_config, thus
any shm_cleanup() registered from ssl_scache_init::socache_shmcb_init().
This can cause a double SHM cleanup when apr_shm_destroy() is called from
ssl_init_ModuleKill::ssl_scache_kill() as pconf is cleared.

Fix this in mod_socache_shmcb by registering a socache_shmcb_cleanup() after
the SHM is created, and by letting socache_shmcb_destroy() run the cleanup,
such that shm_cleanup() is always and ever called only once.

Ideally apr_shm_create() would be consistent accross platforms to register its
shm_cleanup() on the pool but that's not the case for now (I'm on it), so httpd
has to call apr_shm_destroy() explicitely from several places (we'll be able to
remove ssl_scache_kill() and other similar cleanups once the minimal APR
version required by httpd is fixed..).

We could also fix this by registering ssl_init_ModuleKill() late(r) in
ssl_init_Module(), though the more robust mod_socache_shmcb the better for
all the modules..


Reviewed by: ylavic, icing, rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1889798 13f79535-47bb-0310-9956-ffa450edef68
2021-05-12 11:21:09 +00:00
..
2019-07-18 13:57:04 +00:00
2017-03-24 18:00:40 +00:00
2016-03-23 03:53:49 +00:00
2011-11-19 23:05:46 +00:00
2014-12-09 23:57:50 +00:00
2020-07-08 11:09:13 +00:00
2016-03-23 03:53:49 +00:00
2011-12-03 18:02:24 +00:00
2021-01-17 17:23:37 +00:00
2016-03-23 03:53:49 +00:00
2015-05-01 04:10:58 +00:00
2020-02-21 00:33:40 +00:00
2016-03-23 03:53:49 +00:00
2021-05-12 11:21:09 +00:00
2011-12-06 14:18:01 +00:00
2015-08-09 21:57:33 +00:00
2015-08-10 00:11:07 +00:00
2015-08-10 00:11:07 +00:00