1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00

To avoid possible deadlock do not acquire JQUEUE_LOCK before callout_drain.

Obtained from:	Yandex LLC
MFC after:	1 week
Sponsored by:	Yandex LLC
This commit is contained in:
Andrey V. Elsukov 2018-04-13 10:03:30 +00:00
parent 64966663a8
commit 5f69d0a4ff
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=332467

View File

@ -1755,10 +1755,7 @@ nat64lsn_destroy_instance(struct nat64lsn_cfg *cfg)
{
struct nat64lsn_host *nh, *tmp;
JQUEUE_LOCK();
callout_drain(&cfg->jcallout);
JQUEUE_UNLOCK();
callout_drain(&cfg->periodic);
I6HASH_FOREACH_SAFE(cfg, nh, tmp, nat64lsn_destroy_host, cfg);
DPRINTF(DP_OBJ, "instance %s: hosts %d", cfg->name, cfg->ihcount);