git: 3026214ed660 - main - nlm: only access refcounts using dedicated primitives
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 24 Nov 2022 19:47:19 UTC
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=3026214ed6607e216148bfe947e847945fd6e1d4 commit 3026214ed6607e216148bfe947e847945fd6e1d4 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2022-11-24 19:25:25 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2022-11-24 19:46:43 +0000 nlm: only access refcounts using dedicated primitives Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/nlm/nlm_prot_impl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/nlm/nlm_prot_impl.c b/sys/nlm/nlm_prot_impl.c index c84d1bffaac5..877eb96a781d 100644 --- a/sys/nlm/nlm_prot_impl.c +++ b/sys/nlm/nlm_prot_impl.c @@ -829,7 +829,7 @@ nlm_create_host(const char* caller_name) if (!host) return (NULL); mtx_init(&host->nh_lock, "nh_lock", NULL, MTX_DEF); - host->nh_refs = 1; + refcount_init(&host->nh_refs, 1); strlcpy(host->nh_caller_name, caller_name, MAXNAMELEN); host->nh_sysid = nlm_next_sysid++; snprintf(host->nh_sysid_string, sizeof(host->nh_sysid_string),