Date: Tue, 28 Oct 2025 09:49:42 GMT From: Ryan Libby <rlibby@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: a2ce3bd0df22 - stable/15 - ddb show lockedvnods: avoid trap for ufs vnode under construction Message-ID: <202510280949.59S9ngi6056835@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=a2ce3bd0df225da1eccac9f195ae10252be7ec79 commit a2ce3bd0df225da1eccac9f195ae10252be7ec79 Author: Ryan Libby <rlibby@FreeBSD.org> AuthorDate: 2025-10-01 18:25:27 +0000 Commit: Ryan Libby <rlibby@FreeBSD.org> CommitDate: 2025-10-28 09:20:35 +0000 ddb show lockedvnods: avoid trap for ufs vnode under construction ddb show lockedvnods might find a ufs vnode after it is inserted into the mount queue in ffs_vgetf but before the dinode is allocated. Avoid trapping by testing for the dinode pointer. Reviewed by: markj Discussed with: mjg Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D52795 (cherry picked from commit 76157a63a0c63dd7363f6c8ae60edc814b3c138a) --- sys/ufs/ufs/ufs_vnops.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 0921eee92b9d..736c5a66267e 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -2592,8 +2592,12 @@ ufs_print( printf("\tnlink=%d, effnlink=%d, size=%jd", ip->i_nlink, ip->i_effnlink, (intmax_t)ip->i_size); - if (I_IS_UFS2(ip)) - printf(", extsize %d", ip->i_din2->di_extsize); + if (I_IS_UFS2(ip)) { + if (ip->i_din2 == NULL) + printf(", dinode=NULL (fields omitted)"); + else + printf(", extsize=%d", ip->i_din2->di_extsize); + } printf("\n\tgeneration=%jx, uid=%d, gid=%d, flags=0x%b\n", (uintmax_t)ip->i_gen, ip->i_uid, ip->i_gid, (uint32_t)ip->i_flags, PRINT_INODE_FLAGS);home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202510280949.59S9ngi6056835>
