PR 57100. [Michael Kaufmann <apache-bugzilla michael-kaufmann.ch>,
Yann Ylavic]
+ *) mpm_event: Avoid access to the scoreboard from the connection while
+ it is suspended (waiting for events). [Eric Covener, Jeff Trawick]
+
*) mod_ssl: Fix renegotiation failures redirected to an ErrorDocument.
PR 57334. [Yann Ylavic].
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- *) mpm_event: Clear and restore sbh in notify_suspend() and notify_resume()
- respectively. This merges a missing fix from r1545736 (sbh = NULL before
- notify_suspend() for write completion, near line 1068 in 2.4.12) which was
- missed between r1541207 and r1642858.
- trunk patch: http://svn.apache.org/r1663017
- 2.4.x patch: http://people.apache.org/~ylavic/httpd-2.4.x-mpm_event-notify_suspend_sbh.patch
- (trunk works, but the above contains the CHANGES entry, which is 2.4.x only...)
- +1 ylavic, covener, jim
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
{
ap_run_suspend_connection(cs->c, cs->r);
cs->suspended = 1;
+ cs->c->sbh = NULL;
}
-static void notify_resume(event_conn_state_t *cs)
+static void notify_resume(event_conn_state_t *cs, ap_sb_handle_t *sbh)
{
+ cs->c->sbh = sbh;
cs->suspended = 0;
ap_run_resume_connection(cs->c, cs->r);
}
cs->pub.state = CONN_STATE_LINGER_NORMAL;
}
apr_atomic_inc32(&lingering_count);
- cs->c->sbh = NULL;
if (in_worker) {
notify_suspend(cs);
}
+ else {
+ cs->c->sbh = NULL;
+ }
apr_thread_mutex_lock(timeout_mutex);
TO_QUEUE_APPEND(*q, cs);
cs->pfd.reqevents = (
static int start_lingering_close_blocking(event_conn_state_t *cs)
{
if (ap_start_lingering_close(cs->c)) {
- cs->c->sbh = NULL;
notify_suspend(cs);
ap_push_pool(worker_queue_info, cs->p);
return 0;
event_conn_state_t *cs = dummy;
if (cs->suspended) {
- notify_resume(cs);
+ notify_resume(cs, NULL);
}
return APR_SUCCESS;
}
}
else {
c = cs->c;
- c->sbh = sbh;
- notify_resume(cs);
+ notify_resume(cs, sbh);
c->current_thread = thd;
/* Subsequent request on a conn, and thread number is part of ID */
c->id = conn_id;
*/
cs->expiration_time = ap_server_conf->keep_alive_timeout +
apr_time_now();
- c->sbh = NULL;
notify_suspend(cs);
apr_thread_mutex_lock(timeout_mutex);
TO_QUEUE_APPEND(keepalive_q, cs);
}
else if (cs->pub.state == CONN_STATE_SUSPENDED) {
apr_atomic_inc32(&suspended_count);
- c->sbh = NULL;
notify_suspend(cs);
}
}