From nobody Tue Feb 7 20:11:48 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PBDmh36jCz3nfQL; Tue, 7 Feb 2023 20:11:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PBDmh1ztZz3CYr; Tue, 7 Feb 2023 20:11:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675800708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iz/43V29gzQlQ3bG18rV8lPYOPP4qaeQEKlLMu2RxjM=; b=pTjnb3g+10ZaJG5YLyMPbUjL+qOpLMdfOCEr5c2YYtnHZSK+ifNfmbe9PtvlrlYHt9ioqG oXeINdAM8aid3UZrjdDZ8yHGDwedbWsZPdnAasEW8RaGnUVIvvq/yxldRqK0tPiZVSfi9l /kWT82tjVuSPLIO+00r56RH7nZia3TdfPGgK966C/G9cj7iJ9LLv2XEBPvoHTl3PZzKTlm 5nQ+ClQdsDPn9iV493XqRJGkfrqe3nXR33kRKOLsuxmsLlVm+sTgFeSDFyRJJzGRpV1NHT BA+OGPrirWStDhLLAbZuPpdiFjpqaOwa+U5yJ+UY5lunSda7wP+pf3pRd2UmgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675800708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iz/43V29gzQlQ3bG18rV8lPYOPP4qaeQEKlLMu2RxjM=; b=RQeVGmKWHwCRZ5hzVEsV/ciSzs3XYXUF7XitMRwIacPRQDTPnAlP/jQDm9E2seRFuwR2VW GWbCL9osYq47eXGkBG/56Dg4tG+Re8GITlVRgYPcLWz8oua/nxxjgjG/nDJbMXQQm176c6 lpUvnA2oTCPuc+IsjlActbWqdY0IPRxxSVErW7lpk5SvoOlOrw5js1ugRoVprX3GYru/+Y zyEtPKbJfbdANMqb91uDsA9z3DEqmG0oB42KfAZoyAnWril4JHvXgcTITMg50kV0NuWPYO 7J/T66YJhUIDgOwqVHyIbDlvixiSJco0Hv1ZZQ/pxkvHYMPHcsY0UkQTJ5CWEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675800708; a=rsa-sha256; cv=none; b=FAbD/06LnOdmBn/MsXyJBKGtIi/Rq0tJabq8eEAZ2zrojKWlXFl1PldlUxxcMRcE3eFeoQ z21+T8FBlEGpa8y39ptQijTuQunTEYljqzwsx+DzYDUfebVIu74q5iiBCQLBSCoWvR0Hvp n39Q9ekbyV9+y9lkhCbwVJZ82ixv8K95cBxXdobovr6Fuwfaj1U0fEbiIvp0REaI5M5+bq pDDO74bCn/wdPjRTcaPn5l2dcSU7m+phfpKorG9cKeBusFJAuNKEfTHu5nV9I+3PYpdLQu BQymtjerMM4qaC056I+BKWo0n16AEUy0p+IH3dxpK/g5t2vFQhkGmK4UvWe96g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PBDmh13d9zVfg; Tue, 7 Feb 2023 20:11:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 317KBmr5036243; Tue, 7 Feb 2023 20:11:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 317KBmsS036242; Tue, 7 Feb 2023 20:11:48 GMT (envelope-from git) Date: Tue, 7 Feb 2023 20:11:48 GMT Message-Id: <202302072011.317KBmsS036242@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 27202b98dc2d - main - jail: Use atomic(9) instead of CK atomics List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 27202b98dc2d3361f4b5395a93488fc60c3f9af9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=27202b98dc2d3361f4b5395a93488fc60c3f9af9 commit 27202b98dc2d3361f4b5395a93488fc60c3f9af9 Author: Mark Johnston AuthorDate: 2023-02-07 19:35:44 +0000 Commit: Mark Johnston CommitDate: 2023-02-07 20:10:24 +0000 jail: Use atomic(9) instead of CK atomics There's no reason to use one over the other here, let's prefer the interface that's used elsewhere in the kernel. No functional change intended. Reviewed by: mjg Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D38360 --- sys/kern/kern_jail.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 4c1e3ff40c58..75be0df85448 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -771,7 +771,7 @@ prison_ip_set(struct prison *pr, const pr_family_t af, struct prison_ip *new) mem = &pr->pr_addrs[af]; old = *mem; - ck_pr_store_ptr(mem, new); + atomic_store_ptr(mem, new); prison_ip_free(old); } @@ -897,7 +897,7 @@ prison_ip_check(const struct prison *pr, const pr_family_t af, in_epoch(net_epoch_preempt) || sx_xlocked(&allprison_lock)); - pip = ck_pr_load_ptr(&pr->pr_addrs[af]); + pip = atomic_load_ptr(&pr->pr_addrs[af]); if (__predict_false(pip == NULL)) return (EAFNOSUPPORT);