git: 499901dd7a0a - main - ufssuspend(4): mark non-passable
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 05 Oct 2026 22:19:30 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=499901dd7a0afc77745ede85c4e6ec063d43a84d
commit 499901dd7a0afc77745ede85c4e6ec063d43a84d
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-10-04 00:50:57 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-10-05 21:56:53 +0000
ufssuspend(4): mark non-passable
This fixes long-standing issue where ufssuspend file descriptor could
leak over fork or be passed over unix domain socket, and then closing it
in the opener would not unsuspend the file system.
It should not affect the well-behaving growfs(8) utility, but makes the
userspace API safer on principle.
Reviewed by: markj
Tested by: pho (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D60285
---
sys/ufs/ffs/ffs_suspend.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sys/ufs/ffs/ffs_suspend.c b/sys/ufs/ffs/ffs_suspend.c
index c35831c4bb96..9eb6d328e6ca 100644
--- a/sys/ufs/ffs/ffs_suspend.c
+++ b/sys/ufs/ffs/ffs_suspend.c
@@ -60,6 +60,7 @@ static struct cdevsw ffs_susp_cdevsw = {
.d_write = ffs_susp_rdwr,
.d_ioctl = ffs_susp_ioctl,
.d_name = "ffs_susp",
+ .d_flags = D_NONPASSABLE,
};
static struct cdev *ffs_susp_dev;