author | Florian Forster <octo@collectd.org> | |
Fri, 3 Feb 2012 09:54:58 +0000 (10:54 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Fri, 3 Feb 2012 09:54:58 +0000 (10:54 +0100) | ||
commit | f7f4cc14a2eb055b6097a2946fd15bd2b8ac39e4 | |
tree | dea0f08452004b3e925260c29dcb64573be8823c | tree | snapshot |
parent | 917f8784060b467e67b4b05429ddd120be4bb845 | commit | diff |
write_graphite plugin: Fix locking.
wg_send_buffer() is called from wg_flush_nolock(). When calling
wg_flush_nolock(), the thread has to hold cb->send_lock. Locking it again
will fail, but this condition is not checked for. Then the lock is
released twice which may result in concurrency issues.
Change-Id: Ie3062d50e6545adeb95b3a1938837c1f26835a56
wg_send_buffer() is called from wg_flush_nolock(). When calling
wg_flush_nolock(), the thread has to hold cb->send_lock. Locking it again
will fail, but this condition is not checked for. Then the lock is
released twice which may result in concurrency issues.
Change-Id: Ie3062d50e6545adeb95b3a1938837c1f26835a56
src/write_graphite.c | diff | blob | history |