Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Nov 2022 19:47:19 GMT
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 3026214ed660 - main - nlm: only access refcounts using dedicated primitives
Message-ID:  <202211241947.2AOJlJ6J008480@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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),



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202211241947.2AOJlJ6J008480>