diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2026-10-04 00:50:57 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2026-10-05 21:56:53 +0000 |
| commit | 499901dd7a0afc77745ede85c4e6ec063d43a84d (patch) | |
| tree | b72b4f1a9c0f21f5971f6a1ba9d336936f2dd6be | |
| parent | 850d4562928ea9308dd9188d5014bcabe7049938 (diff) | |
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
| -rw-r--r-- | sys/ufs/ffs/ffs_suspend.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |
