Mercurial > hg > nginx
comparison src/core/ngx_cycle.c @ 4956:bbcaeccbd928 stable-1.2
Merge of r4933, r4933: shared memory fixes.
*) Fixed location of debug message in ngx_shmtx_lock().
*) 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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 10 Dec 2012 18:17:32 +0000 |
parents | db9ce6fc9482 |
children | f4809ba58b15 |
comparison
equal
deleted
inserted
replaced
4955:2e4e4084b562 | 4956:bbcaeccbd928 |
---|---|
445 != 0) | 445 != 0) |
446 { | 446 { |
447 continue; | 447 continue; |
448 } | 448 } |
449 | 449 |
450 if (shm_zone[i].shm.size == oshm_zone[n].shm.size) { | 450 if (shm_zone[i].tag == oshm_zone[n].tag |
451 && shm_zone[i].shm.size == oshm_zone[n].shm.size) | |
452 { | |
451 shm_zone[i].shm.addr = oshm_zone[n].shm.addr; | 453 shm_zone[i].shm.addr = oshm_zone[n].shm.addr; |
452 | 454 |
453 if (shm_zone[i].init(&shm_zone[i], oshm_zone[n].data) | 455 if (shm_zone[i].init(&shm_zone[i], oshm_zone[n].data) |
454 != NGX_OK) | 456 != NGX_OK) |
455 { | 457 { |