commit 4c154053a6f1aef9ba3f6ae061fb783066b93700
Author: Matthew Dillon <[email protected]>
Date: Sat Feb 22 11:12:35 2020 -0800
tmpfs - Fix races in tmpfs_nrename() and tmpfs_nrmdir()
* Lock all nrename elements before checks. This is particularly
important when renaming over a file or empty directory, but other
manipulations done by this code without locks could also cause
races which result in corruption, particularly with the link count.
* Lock all nrmdir elements before checks, for the same reason.
Summary of changes:
sys/vfs/tmpfs/tmpfs.h | 4 +++
sys/vfs/tmpfs/tmpfs_subr.c | 27 +++++++++++++++++++
sys/vfs/tmpfs/tmpfs_vnops.c | 64 ++++++++++++++++++++-------------------------
3 files changed, 59 insertions(+), 36 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4c154053a6f1aef9ba3f6ae061fb783066b93700
--
DragonFly BSD source repository