From nobody Thu May 07 05:02:54 2026 X-Original-To: dev-commits-src-all@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 4gB0W30tMWz6dSxZ for ; Thu, 07 May 2026 05:02:55 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gB0W24X28z3w47 for ; Thu, 07 May 2026 05:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1778130174; 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=gQXijSTwGBB3wG2Z/w1rIgba5WaHjrXZsYry1ZcisfY=; b=SI1RHGmk9TJl75CS8dIW4W2ra87rpqIxA0pOhn7sQpfkO9ahtO6KJiKmbxplT7/l4MAtv1 yVMKr+Mp4X+8RujzL5o8fOPMZeE8v9cdJ/Vb2Ena9JExQhg8I2d+XTyt1IS+v8FWI8fbU4 Ke8/TvM1Pv8EKvs4PXydW+TzeU6Z0F5+zJ/i5a8++ZBoW8BSNdpYRsAAkXXMJMNTTNYTSe dcaG5UOZr/r4jUVn3e4w8X5N4zhc20TrpEDgoM1L7WXFMDUzHgqRb+43eOBHejVwUh1Kz1 jRNzeHegFACSKguScexNHn2uRJl/wYMfrpUJZw3Eoy4uHAvjmD1PCmvNmRtEZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1778130174; a=rsa-sha256; cv=none; b=Q40HQ+BIwgKXV3RyBrWms9sO34oAGUGEg6TA37cxlC6uc0zG7pqdMls5GnIxwyfiK/8kwv /WPkXyT1FNsEl5KiUKbIhpEZhPos+teVZ+l6/tOaaDMWu7XwApLFfb+zlGGDGz02QglPeN AgLBabXtbarFmbDkSVzoxHGy4nqefTT93En5kI3GNXSGCGxUErBgZi3gSu6mz+lOt4evRP rRg/x1jhJV2+681gtICCdEd2I6XA+jCUWaSKr0jUhybby1GflkejVOb7D3uk7swWG9VqVS XT5W3QCKXEFToKnZg4PDNuW4RQW3WSFYRaTkHB+Gja10MO/YXLP31jIfZiUs+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1778130174; 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=gQXijSTwGBB3wG2Z/w1rIgba5WaHjrXZsYry1ZcisfY=; b=l1UlBsJs3mMAcOgzQxoxzD3qPVKvRy2sniRwIcW8GQC5VZng1f/+SK5Mt0D6gLXgaRXmW4 SFIYP1MvOghJI5/uVeMzoDVaudHU8DXOEQ7MSPUoS75ytvw+7TV6In5J1NZlgcrMIxa6I6 JIJSXcAF8HLC35KBRX9aEvy/os7V9buK7vuSkr6SB9Jxt5UPHoqheKpzp3bUMZUBfs7J+V iyUqKz4u6Fj8DKpKl2eGAYtEbFW329pSE+4i+FpQUt+XiXtk5j8OcUimQvpIZvLYr2QFnq PvglSMvuGAGlmn2wG6C24c5/yvvHzahWXR6j9+J2tVxonRFeoxhWmd9bxfechw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gB0W23kRRz19yk for ; Thu, 07 May 2026 05:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35f34 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 07 May 2026 05:02:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 1ed2ef42e017 - main - p9fs: Move UMA zone initialization to VFS module lifecycle List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1ed2ef42e01771f5d8ca9be61e07dcf0fd47feba Auto-Submitted: auto-generated Date: Thu, 07 May 2026 05:02:54 +0000 Message-Id: <69fc1cfe.35f34.2afae8bd@gitrepo.freebsd.org> The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=1ed2ef42e01771f5d8ca9be61e07dcf0fd47feba commit 1ed2ef42e01771f5d8ca9be61e07dcf0fd47feba Author: Alex Richardson AuthorDate: 2026-05-07 04:21:50 +0000 Commit: Alex Richardson CommitDate: 2026-05-07 04:23:04 +0000 p9fs: Move UMA zone initialization to VFS module lifecycle Previously, the UMA zones required for 9P requests (p9fs_buf_zone, p9fs_req_zone, etc.) were initialized and destroyed in the virtio_p9fs transport module. This caused issues when unloading the core p9fs module. This change moves p9_init_zones() and p9_destroy_zones() into p9fs_init() and p9fs_uninit() inside p9fs_vfsops.c so that they are correctly bound to the VFS filesystem module lifecycle via vfs_modevent, aligning p9fs with standard FreeBSD VFS semantics. Found while fixing https://github.com/CTSRD-CHERI/cheribsd/issues/2617. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56492 --- sys/dev/virtio/p9fs/virtio_p9fs.c | 3 +-- sys/fs/p9fs/p9fs_vfsops.c | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/dev/virtio/p9fs/virtio_p9fs.c b/sys/dev/virtio/p9fs/virtio_p9fs.c index f76b135c042d..19a32fea458e 100644 --- a/sys/dev/virtio/p9fs/virtio_p9fs.c +++ b/sys/dev/virtio/p9fs/virtio_p9fs.c @@ -471,14 +471,12 @@ vt9p_modevent(module_t mod, int type, void *unused) switch (type) { case MOD_LOAD: if (loaded++ == 0) { - p9_init_zones(); p9_register_trans(&vt9p_trans); } break; case MOD_UNLOAD: if (--loaded == 0) { p9_unregister_trans(&vt9p_trans); - p9_destroy_zones(); } break; case MOD_SHUTDOWN: @@ -487,6 +485,7 @@ vt9p_modevent(module_t mod, int type, void *unused) error = EOPNOTSUPP; break; } + return (error); } diff --git a/sys/fs/p9fs/p9fs_vfsops.c b/sys/fs/p9fs/p9fs_vfsops.c index 0e09c58e57b6..a0f0a5a4e494 100644 --- a/sys/fs/p9fs/p9fs_vfsops.c +++ b/sys/fs/p9fs/p9fs_vfsops.c @@ -119,6 +119,8 @@ p9fs_init(struct vfsconf *vfsp) p9fs_io_buffer_zone = uma_zcreate("p9fs io_buffer zone", P9FS_MTU, NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); + p9_init_zones(); + return (0); } @@ -127,6 +129,8 @@ static int p9fs_uninit(struct vfsconf *vfsp) { + p9_destroy_zones(); + uma_zdestroy(p9fs_node_zone); uma_zdestroy(p9fs_io_buffer_zone); uma_zdestroy(p9fs_getattr_zone);