diff options
author | Dave Barach <dave@barachs.net> | 2019-08-22 19:32:49 -0400 |
---|---|---|
committer | Dave Barach <dave@barachs.net> | 2019-08-22 19:33:34 -0400 |
commit | 84a563ae4050cc0389dcd438fbe9ea882f2b8404 (patch) | |
tree | 18b9db5ecbd3cd9480f6f94e237720321c2b877f /src/plugins/dns/resolver_process.c | |
parent | a43c93f8554ad7418e31be3791b3fb71232f60ac (diff) |
dns: fix trivial multi-thread deadlock
Add a simple lock trace mechanism
Type: fix
Ticket: VPP-1752
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Idc82b1ad59adb0f7c185d27ced57e9a4c25ce62f
Diffstat (limited to 'src/plugins/dns/resolver_process.c')
-rw-r--r-- | src/plugins/dns/resolver_process.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/dns/resolver_process.c b/src/plugins/dns/resolver_process.c index 802da53cec5..51fe9d76a08 100644 --- a/src/plugins/dns/resolver_process.c +++ b/src/plugins/dns/resolver_process.c @@ -70,7 +70,7 @@ resolve_event (dns_main_t * dm, f64 now, u8 * reply) /* $$$ u16 limits cache to 65K entries, fix later multiple dst ports */ pool_index = clib_net_to_host_u16 (d->id); - dns_cache_lock (dm); + dns_cache_lock (dm, 10); if (pool_is_free_index (dm->entries, pool_index)) { @@ -306,7 +306,7 @@ retry_scan (dns_main_t * dm, f64 now) for (i = 0; i < vec_len (dm->unresolved_entries); i++) { - dns_cache_lock (dm); + dns_cache_lock (dm, 11); ep = pool_elt_at_index (dm->entries, dm->unresolved_entries[i]); ASSERT ((ep->flags & DNS_CACHE_ENTRY_FLAG_VALID) == 0); |