From nobody Thu May 18 23:10:27 2023 X-Original-To: dev-commits-src-branches@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 4QMm0g48syz4C7ry; Thu, 18 May 2023 23:10:27 +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 4QMm0g3YJxz47C5; Thu, 18 May 2023 23:10:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684451427; 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=z2G/wHFBAvycS2wHrFPMVtnqs5GPVuSo1mQ4RFtdRtQ=; b=pk90Hso2IHuYWDVHB7M2dwZ08u7og8N7BKeWwjvCJIGXR+0XtZrRZVvp/XRqWhCAUhitd+ r3CEJkUU6e8c9XemKGcZLB3mt2bDWDlbOmz2tiQOGibpAjUCAW2zY/SpQgtFrnUvSZe8pi UqD6ySNNeGyPN8cvfk0wc0ohisoAIYuzh30Yif/wYhWLkSR7GY55SIrhviobKncYw6np90 lR3QhmAg/5R7ng88WDJnuhzJ5N5LKcoeY9ua6UhOlX6uSO0MfSIXdzH75IaKh7+T5Umru7 0HW8drbpJaOTCcRt9HqSRLIbw17MUrH+TPItVm6sx/KY12CNn5IIDfuD9UjxdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684451427; 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=z2G/wHFBAvycS2wHrFPMVtnqs5GPVuSo1mQ4RFtdRtQ=; b=GqY1RekR/Va7kW8MH5O4O39XxEj4EuNVeaQdYoTl5SCKtBOMW1Lp09YOiKtc8UcKqLWdgG 2F0tH201LlDPdaYLZhdjODhQzTKG0glIp7WO3jw8YrRexMO9lKluiEtInOEkt6tvbIWL1l LPoiIFIcS5jJJR1ua1Q6nt680g9kCbwTKXsP3N54cErnBBmmmA5/AGNvrRfIbEG53iZEQE ryiTYLfZeJB318efn32HnwD7eUsexXfyBJMDcTmJIs8VALF73AjNYtFf2aLecSQqWBF5n0 mCus4XB0c+/hgVdF+XjdphDsQu+VnA9iAWzGpFIprIlzNjQqARKnCeiJWt7oAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684451427; a=rsa-sha256; cv=none; b=aKEL06VhAZeD2M8CAUdXhqZ5BVYgTtgBi/e/r98YBasof16cmiT7WEpGBkCkwp5wHLZ4a3 672dQlDKQU+oW88PfYOQF7M2Tuj/lHkNazpOeEaPBIpo+DmEhjVbkhRUpQ+XvK1LNWAQTt mvyD0eg782FfML3etJdQN5+2/pGUkMVxMPdtPiQVqeLOkGWjVjMc2fszXqsGxTRAthZte8 g9Nhf2QcJMI1YX81GsBBz1DswHAZXWSyaqKTPiY/OohSrDNuCvVOLXEgmOZiMT9T6B6AaD XTBEYw+S8r/Zf2LebaMrtXOk/GPELuLAQjDl1XH+ng2XJFp/9YrdF2rnVIDj4w== 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 4QMm0g2bmMz14n6; Thu, 18 May 2023 23:10:27 +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 34INARfI021869; Thu, 18 May 2023 23:10:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34INAR73021868; Thu, 18 May 2023 23:10:27 GMT (envelope-from git) Date: Thu, 18 May 2023 23:10:27 GMT Message-Id: <202305182310.34INAR73021868@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: b4098b4fd6d6 - stable/13 - nfscommon: Use IS_DEFAULT_VNET() in the vnet initialization List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: b4098b4fd6d63d88abba265b06bf4aa39174b7be Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=b4098b4fd6d63d88abba265b06bf4aa39174b7be commit b4098b4fd6d63d88abba265b06bf4aa39174b7be Author: Rick Macklem AuthorDate: 2023-02-21 03:43:37 +0000 Commit: Rick Macklem CommitDate: 2023-05-18 23:09:39 +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). (cherry picked from commit ef4e8f0cf91f7009745d5a7a90d3bdd2d9e25780) --- 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 d72565cd3e9c..e78edff964f9 100644 --- a/sys/fs/nfs/nfs_commonport.c +++ b/sys/fs/nfs/nfs_commonport.c @@ -878,7 +878,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),