From nobody Tue Feb 21 03:44:30 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 4PLQC24PJBz3swPC; Tue, 21 Feb 2023 03:44:30 +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 4PLQC23v1Pz4NCL; Tue, 21 Feb 2023 03:44:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676951070; 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=Rr+M2wzCN0rLIVwD1ZSoGLrc9HVy8P7glFQIrw5htds=; b=s7ifsmDzR7F8Ge4mkZEqyw1XPC5QF9omcVzPAHd47EHaEwc0vZ2TspJp69siZ9dGxbuYmY z0lmVKNGcb4pr2ABn0Ci6PT91KrBSqRMghfKlnYL3GgEXDNeHWRncBYJC2T4mvgBm2c0+2 BDScsW2EAvJMaGf3E9kXsKV9HDbJsbqyidV3YTYMLGSqmcCHvSGA+6rQjVtjVTlPSzjL4T 2s/HV2dJmhB4lcczCtHGOmixXYiYCkwaTATVWIhVrFp4SpOHvmiAQD99bfs8WsrGTVO8vK nYEAZiKsEvJlK9RhI45AYkX+/yZumGHBZSNDLtu48lKK+rQzJ/DMzTcO7jV9Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676951070; 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=Rr+M2wzCN0rLIVwD1ZSoGLrc9HVy8P7glFQIrw5htds=; b=eCEGPHQ4lzRJquW+VpHvjRRVvgl2UxwlXIkATG5osvE8IXEQ/k2QXVATgnK3BIu0PSQBxn dwoP6K0hnmwg+YAlhQFbgYi5FVk1zhFAwkIjlks5phIJsgrzkHFngIGy+6cZ34OC7KqJqH tRLK4axo+QsNtnS4byifii3hdysZryLwFT/6i3eTytH5gdTXdjSfynIN5AcPLXe2F59cpI Q4HGQyEq/sBVrG4F4dWYNzXAUj9XpAP2gUEfxOwlxWGIbV8uUyukHMP4Bv8LfV+FfcXrIq qhSXKJBlre/PC04uq+890eAdD6y5R4nDPMuI7XQ8PJrwsLcwzZCp3EfUTDNM1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676951070; a=rsa-sha256; cv=none; b=GMQHmxP0WAuknQr7BDW3cQXSa3eYwiyliT9U80lvDAXVMWNjt1H4hw7HgoCW8tVVdYeSlC FI+RGdnf2F/kkcs6YV+JQsKRWjoQNlF1LbUl3ikNWoEvIb97wVmNzVMKVPYfeHbjnacIFS NlI3KLLNs/DxVjA8F5HdG92WzmGy6eF5eqfDvavpYmmKUlBs3LLKWqlsMyyLI37LxIwTjN kqLuxtObZdxPM1KpYiikrOuCmornoVT3zhr8WcdphWxnOiX36my31HeO+JtuAqiBd0BKNu 4zpDf4SXxakJpgooD44dAWyZLeG4ipsvP8WjbGof+KTP6P4bwlzDaacVoRXLJw== 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 4PLQC22xzfz16Mv; Tue, 21 Feb 2023 03:44:30 +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 31L3iUmO039013; Tue, 21 Feb 2023 03:44:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31L3iUaC039012; Tue, 21 Feb 2023 03:44:30 GMT (envelope-from git) Date: Tue, 21 Feb 2023 03:44:30 GMT Message-Id: <202302210344.31L3iUaC039012@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: ef4e8f0cf91f - main - nfscommon: Use IS_DEFAULT_VNET() in the vnet initialization 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: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ef4e8f0cf91f7009745d5a7a90d3bdd2d9e25780 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=ef4e8f0cf91f7009745d5a7a90d3bdd2d9e25780 commit ef4e8f0cf91f7009745d5a7a90d3bdd2d9e25780 Author: Rick Macklem AuthorDate: 2023-02-21 03:43:37 +0000 Commit: Rick Macklem CommitDate: 2023-02-21 03:43:37 +0000 nfscommon: Use IS_DEFAULT_VNET() in the vnet initialization Another oopsie. The vnet initialization function in nfs_commonport.c for initializing prison0 by testing curthread->td_ucred->cr_prison == &prison0. This is bogus and always true. Replace it with IS_DEFAULT_VNET(curvnet). MFC after: 3 months --- sys/fs/nfs/nfs_commonport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c index 99482069c36d..212b498e6328 100644 --- a/sys/fs/nfs/nfs_commonport.c +++ b/sys/fs/nfs/nfs_commonport.c @@ -877,7 +877,7 @@ static void nfs_vnetinit(const void *unused __unused) { - if (curthread->td_ucred->cr_prison == &prison0) + if (IS_DEFAULT_VNET(curvnet)) NFSD_VNET(nfsstatsv1_p) = &nfsstatsv1; else NFSD_VNET(nfsstatsv1_p) = malloc(sizeof(struct nfsstatsv1),