]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
* modules/core/mod_watchdog.c: Switch to simpler logic to avoid the
authorJoe Orton <jorton@apache.org>
Tue, 14 Apr 2020 12:37:17 +0000 (12:37 +0000)
committerJoe Orton <jorton@apache.org>
Tue, 14 Apr 2020 12:37:17 +0000 (12:37 +0000)
commit452ae9a3c234295f7a8b4e94041f015919d9f5f4
tree16b0c62108d10933c6508f012c33b3d961e9097f
parent5cad59790c243871e490419e26c7b46effa7b278
* modules/core/mod_watchdog.c: Switch to simpler logic to avoid the
  thread cleanup running before the thread has started, avoiding
  mutex operations which both have undefined behaviour:

  a) double-locking an UNNESTED (non-recursive) mutex twice in the parent
  b) unlocking a mutex in the spawned thread which was locked by the parent

  (wd_startup, wd_worker_cleanup, wd_worker): Use a boolean to ensure
  the cleanup does nothing if the thread wasn't started, drop the mutex.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876511 13f79535-47bb-0310-9956-ffa450edef68
modules/core/mod_watchdog.c