[nginx] svn commit: r4957 - in branches/stable-1.2: . src/core
mdounin at mdounin.ru
mdounin at mdounin.ru
Mon Dec 10 18:17:32 UTC 2012
Author: mdounin
Date: 2012-12-10 18:17:32 +0000 (Mon, 10 Dec 2012)
New Revision: 4957
URL: http://trac.nginx.org/nginx/changeset/4957/nginx
Log:
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.
Modified:
branches/stable-1.2/
branches/stable-1.2/src/core/ngx_cycle.c
branches/stable-1.2/src/core/ngx_shmtx.c
Index: branches/stable-1.2
===================================================================
--- branches/stable-1.2 2012-12-10 18:04:54 UTC (rev 4956)
+++ branches/stable-1.2 2012-12-10 18:17:32 UTC (rev 4957)
Property changes on: branches/stable-1.2
___________________________________________________________________
Modified: svn:mergeinfo
## -1 +1 ##
-/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4741,4754,4756-4771,4775,4777-4780,4782-4785,4795,4811-4820,4822-4824,4828-4835,4840-4844,4865-4872,4885-4887,4890-4896,4913-4920,4939
+/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4741,4754,4756-4771,4775,4777-4780,4782-4785,4795,4811-4820,4822-4824,4828-4835,4840-4844,4865-4872,4885-4887,4890-4896,4913-4920,4933-4934,4939
\ No newline at end of property
Modified: branches/stable-1.2/src/core/ngx_cycle.c
===================================================================
--- branches/stable-1.2/src/core/ngx_cycle.c 2012-12-10 18:04:54 UTC (rev 4956)
+++ branches/stable-1.2/src/core/ngx_cycle.c 2012-12-10 18:17:32 UTC (rev 4957)
@@ -447,7 +447,9 @@
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;
if (shm_zone[i].init(&shm_zone[i], oshm_zone[n].data)
Modified: branches/stable-1.2/src/core/ngx_shmtx.c
===================================================================
--- branches/stable-1.2/src/core/ngx_shmtx.c 2012-12-10 18:04:54 UTC (rev 4956)
+++ branches/stable-1.2/src/core/ngx_shmtx.c 2012-12-10 18:17:32 UTC (rev 4957)
@@ -117,11 +117,11 @@
"sem_wait() failed while waiting on shmtx");
break;
}
-
- ngx_log_debug0(NGX_LOG_DEBUG_CORE, ngx_cycle->log, 0,
- "shmtx awoke");
}
+ ngx_log_debug0(NGX_LOG_DEBUG_CORE, ngx_cycle->log, 0,
+ "shmtx awoke");
+
continue;
}
More information about the nginx-devel
mailing list