NetBSD Problem Report #43745
From www@NetBSD.org Thu Aug 12 09:37:40 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id AD95663BBBD
for <gnats-bugs@gnats.NetBSD.org>; Thu, 12 Aug 2010 09:37:40 +0000 (UTC)
Message-Id: <20100812093740.74E9763BBBA@www.NetBSD.org>
Date: Thu, 12 Aug 2010 09:37:40 +0000 (UTC)
From: pooka@iki.fi
Reply-To: pooka@iki.fi
To: gnats-bugs@NetBSD.org
Subject: fhopen of an unlinked file causes problems on multiple file systems
X-Send-Pr-Version: www-1.0
>Number: 43745
>Category: kern
>Synopsis: fhopen of an unlinked file causes problems on multiple file systems
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Aug 12 09:40:00 +0000 2010
>Closed-Date: Sat Nov 01 04:22:38 +0000 2025
>Last-Modified: Sat Nov 01 04:22:38 +0000 2025
>Originator: Antti Kantee
>Release:
>Organization:
>Environment:
>Description:
getfh() + unlink() + fhopen() succeeds on msdosfs and lfs.
It panics the kernel on with nfs.
>How-To-Repeat:
run tests/fs/vfs/t_vfsops
>Fix:
>Release-Note:
>Audit-Trail:
From: Antti Kantee <pooka@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/43745 CVS commit: src/sys/nfs
Date: Thu, 12 Aug 2010 09:41:11 +0000
Module Name: src
Committed By: pooka
Date: Thu Aug 12 09:41:11 UTC 2010
Modified Files:
src/sys/nfs: nfs_vfsops.c
Log Message:
Do not return a garbage vnode in vpp if fhtovp fails.
Fixes PR kern/43745 for nfs.
To generate a diff of this commit:
cvs rdiff -u -r1.216 -r1.217 src/sys/nfs/nfs_vfsops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Antti Kantee <pooka@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/43745 CVS commit: src/tests/fs/vfs
Date: Thu, 12 Aug 2010 09:42:53 +0000
Module Name: src
Committed By: pooka
Date: Thu Aug 12 09:42:53 UTC 2010
Modified Files:
src/tests/fs/vfs: t_vfsops.c
Log Message:
Fill in PR kern/43745 now that it exists.
lfs_tfhremove: Expected failure: fhopen() for removed file succeeds (PR kern/43745): t_vfsops.c:161: Expected true value in rump_sys_fhopen(fhp, fhsize, O_RDONLY) == -1
msdosfs_tfhremove: Expected failure: fhopen() for removed file succeeds (PR kern/43745): t_vfsops.c:161: Expected true value in rump_sys_fhopen(fhp, fhsize, O_RDONLY) == -1
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/fs/vfs/t_vfsops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Juergen Hannken-Illjes" <hannken@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/43745 CVS commit: src
Date: Mon, 4 Apr 2011 19:16:59 +0000
Module Name: src
Committed By: hannken
Date: Mon Apr 4 19:16:58 UTC 2011
Modified Files:
src/sys/fs/msdosfs: denode.h msdosfs_denode.c msdosfs_vfsops.c
src/tests/fs/vfs: t_vfsops.c
Log Message:
Msdosfs on-disk meta data is not sufficient to create or validate file handles.
Maintain a tree of file handles, create nodes from msdosfs_vptofh() and keep
them until either the file gets unlinked or the file system gets unmounted.
Fixes the msdosfs part of PR #43745 (fhopen of an unlinked file causes problems
on multiple file systems)
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/fs/msdosfs/denode.h
cvs rdiff -u -r1.42 -r1.43 src/sys/fs/msdosfs/msdosfs_denode.c
cvs rdiff -u -r1.89 -r1.90 src/sys/fs/msdosfs/msdosfs_vfsops.c
cvs rdiff -u -r1.10 -r1.11 src/tests/fs/vfs/t_vfsops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Konrad Schroder" <perseant@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/43745 CVS commit: src
Date: Sat, 1 Nov 2025 04:10:48 +0000
Module Name: src
Committed By: perseant
Date: Sat Nov 1 04:10:47 UTC 2025
Modified Files:
src/sys/ufs/lfs: lfs_alloc.c lfs_extern.h lfs_inode.h lfs_rename.c
lfs_vnops.c ulfs_vfsops.c
src/tests/fs/vfs: t_vfsops.c
Log Message:
Create a new LFS inode flag, IN_DEAD, to indicate that a file's last
reference, other than those that come with VU_DIROP or IN_CLEANING and
the one the caller holds, has been dropped. Check and apply this flag
in lfs_orphan(), and call lfs_orphan() on close if the link count is
zero. Change the signature of lfs_orphan to facilitate.
Make test t_vfsops:lfs_tfhremove expect success.
Closes PR kern/43745.
To generate a diff of this commit:
cvs rdiff -u -r1.145 -r1.146 src/sys/ufs/lfs/lfs_alloc.c
cvs rdiff -u -r1.123 -r1.124 src/sys/ufs/lfs/lfs_extern.h
cvs rdiff -u -r1.27 -r1.28 src/sys/ufs/lfs/lfs_inode.h
cvs rdiff -u -r1.25 -r1.26 src/sys/ufs/lfs/lfs_rename.c
cvs rdiff -u -r1.345 -r1.346 src/sys/ufs/lfs/lfs_vnops.c
cvs rdiff -u -r1.16 -r1.17 src/sys/ufs/lfs/ulfs_vfsops.c
cvs rdiff -u -r1.12 -r1.13 src/tests/fs/vfs/t_vfsops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: perseant@NetBSD.org
State-Changed-When: Sat, 01 Nov 2025 04:22:38 +0000
State-Changed-Why:
The patch lets the test succeed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.