[6.0] 6b2e8ec0b document a potential race
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Thu Aug 16 08:52:51 UTC 2018
commit 6b2e8ec0b6556c1d150499d528e57c168cfd0db3
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Mon Apr 30 13:48:16 2018 +0200
document a potential race
closes #2625
diff --git a/bin/varnishd/cache/cache_tcp_pool.c b/bin/varnishd/cache/cache_tcp_pool.c
index 86777ae6c..fd416e822 100644
--- a/bin/varnishd/cache/cache_tcp_pool.c
+++ b/bin/varnishd/cache/cache_tcp_pool.c
@@ -667,6 +667,10 @@ VTP_Ref(const struct suckaddr *ip4, const struct suckaddr *ip6, const char *uds,
if (cp != NULL)
return (cp->priv);
+ /*
+ * this is racy - we could end up with additional pools on the same id /
+ * destination address with just a single connection
+ */
ALLOC_OBJ(tp, TCP_POOL_MAGIC);
AN(tp);
if (uds != NULL) {
More information about the varnish-commit
mailing list