mirror of
https://github.com/nginx/nginx.git
synced 2024-12-20 14:13:33 -06:00
Core: don't reuse shared memory zone that changed ownership (ticket #210).
nginx doesn't allow the same shared memory zone to be used for different purposes, but failed to check this on reconfiguration. If a shared memory zone was used for another purpose in the new configuration, nginx attempted to reuse it and crashed.
This commit is contained in:
parent
9f385870f6
commit
a94a101c79
@ -447,7 +447,9 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shm_zone[i].shm.size == oshm_zone[n].shm.size) {
|
if (shm_zone[i].tag == oshm_zone[n].tag
|
||||||
|
&& shm_zone[i].shm.size == oshm_zone[n].shm.size)
|
||||||
|
{
|
||||||
shm_zone[i].shm.addr = oshm_zone[n].shm.addr;
|
shm_zone[i].shm.addr = oshm_zone[n].shm.addr;
|
||||||
|
|
||||||
if (shm_zone[i].init(&shm_zone[i], oshm_zone[n].data)
|
if (shm_zone[i].init(&shm_zone[i], oshm_zone[n].data)
|
||||||
|
Loading…
Reference in New Issue
Block a user