Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 Aug 2026 08:51:10 +0000
From:      Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav <des@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 4ebcdb8dd9a7 - main - pseudofs: Don't purge the cache on shutdown
Message-ID:  <6a72f97e.3da20.48c8f0c8@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by des:

URL: https://cgit.FreeBSD.org/src/commit/?id=4ebcdb8dd9a7bdddbc97ff6ee47e0a7556c76b5a

commit 4ebcdb8dd9a7bdddbc97ff6ee47e0a7556c76b5a
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2026-08-05 08:50:47 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-08-05 08:50:47 +0000

    pseudofs: Don't purge the cache on shutdown
    
    This is a waste of time and results in a use-after-free if linsysfs is
    loaded and a USB network interface is in use, since USB devices are
    disconnected at shutdown, which triggers a call into linsysfs, which
    then tries to destroy a pseudofs node which has already been purged.
    
    MFC after:      1 week
    Reviewed by:    glebius
    Differential Revision:  https://reviews.freebsd.org/D58359
---
 sys/fs/pseudofs/pseudofs.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sys/fs/pseudofs/pseudofs.c b/sys/fs/pseudofs/pseudofs.c
index 7a4e67455214..a301140f1003 100644
--- a/sys/fs/pseudofs/pseudofs.c
+++ b/sys/fs/pseudofs/pseudofs.c
@@ -532,7 +532,6 @@ pfs_modevent(module_t mod, int evt, void *arg)
 		pfs_vncache_load();
 		break;
 	case MOD_UNLOAD:
-	case MOD_SHUTDOWN:
 		pfs_vncache_unload();
 		break;
 	default:


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a72f97e.3da20.48c8f0c8>