diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-03-25 17:20:51 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-03-25 17:20:51 +0100 |
commit | 6ffb9010811ee9bc0c3703716443c4dd00922f6f (patch) | |
tree | 3885cfd217a62d2e8fc9707a8b0491f1cade9af0 /runtime/wtp.h | |
parent | 96e9bff86d203e15df371960a285143f6bfa9d6a (diff) | |
download | rsyslog-6ffb9010811ee9bc0c3703716443c4dd00922f6f.tar.gz rsyslog-6ffb9010811ee9bc0c3703716443c4dd00922f6f.tar.xz rsyslog-6ffb9010811ee9bc0c3703716443c4dd00922f6f.zip |
bugfix: potential abort with DA queue after high watermark is reached
There exists a race condition that can lead to a segfault. Thanks
go to vbernetr, who performed the analysis and provided patch, which
I only tweaked a very little bit.
Diffstat (limited to 'runtime/wtp.h')
-rw-r--r-- | runtime/wtp.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/wtp.h b/runtime/wtp.h index 13ebe536..0f21ac11 100644 --- a/runtime/wtp.h +++ b/runtime/wtp.h @@ -60,6 +60,7 @@ typedef struct wtp_s { int bInactivityGuard;/* prevents inactivity due to race condition */ rsRetVal (*pConsumer)(void *); /* user-supplied consumer function for dewtpd messages */ /* synchronization variables */ + pthread_mutex_t mutThrdShutdwn; /* mutex to guard thread shutdown processing */ pthread_mutex_t mut; /* mutex for the wtp's thread management */ pthread_cond_t condThrdTrm;/* signalled when threads terminate */ int bThrdStateChanged; /* at least one thread state has changed if 1 */ |