Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/dist/uts/common/fs/zfs In zfs_statvfs(),...
details: https://anonhg.NetBSD.org/src/rev/3ace2bf995b2
branches: trunk
changeset: 1026585:3ace2bf995b2
user: simonb <simonb%NetBSD.org@localhost>
date: Tue Nov 30 12:37:38 2021 +0000
description:
In zfs_statvfs(), set f_bresvd and f_fresvd to 0. Fixes random kernel
accounting suspend/resumes with erroneous values leaking out.
Note: no userland leakage as statvfs(2) handler memset 0's the buffer.
XXX: Should be fixed with a memset in VFS_STATVFS().
diffstat:
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diffs (19 lines):
diff -r cd7598cba264 -r 3ace2bf995b2 external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c Tue Nov 30 12:32:09 2021 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c Tue Nov 30 12:37:38 2021 +0000
@@ -2182,6 +2182,7 @@
statp->f_blocks = (refdbytes + availbytes) >> SPA_MINBLOCKSHIFT;
statp->f_bfree = availbytes / statp->f_bsize;
statp->f_bavail = statp->f_bfree; /* no root reservation */
+ statp->f_bresvd = 0;
/*
* statvfs() should really be called statufs(), because it assumes
@@ -2196,6 +2197,7 @@
statp->f_favail = statp->f_ffree; /* no "root reservation" */
#endif
statp->f_files = statp->f_ffree + usedobjs;
+ statp->f_fresvd = 0;
#ifdef __FreeBSD__
(void) cmpldev(&d32, vfsp->vfs_dev);
Home |
Main Index |
Thread Index |
Old Index