1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00
freebsd/sys/fs
Jason A. Harmening 06f79675b7 unionfs: fix potential deadlock in VOP_RMDIR
VOP_RMDIR() is called with both parent and child directory vnodes
locked.  The relookup operation performed by the unionfs implementation
may relock both vnodes.  Accordingly, unionfs_relookup() drops the
parent vnode lock, but the child vnode lock is never dropped.
Although relookup() will very likely try to relock the child vnode
which is already locked, in most cases this doesn't produce a deadlock
because unionfs_lock() forces LK_CANRECURSE (!).  However, relocking
of the parent vnode while the child vnode remains locked effectively
reverses the expected parent->child lock order, which can produce
a deadlock e.g. in the presence of a concurrent unionfs_lookup()
operation.  Address the issue by dropping the child lock around
the unionfs_relookup() call in unionfs_rmdir().

Reported by:	pho
Reviewed by:	kib, markj
Differential Revision: https://reviews.freebsd.org/D32986
2021-11-14 20:07:42 -08:00
..
autofs vfs: remove cn_thread 2021-10-11 13:21:47 +00:00
cd9660 buffer pager: allow get_blksize method to return error 2021-09-17 20:29:55 +03:00
cuse
deadfs
devfs vfs: remove thread argument from VOP_STAT 2021-10-11 13:22:32 +00:00
ext2fs vfs: remove cn_thread 2021-10-11 13:21:47 +00:00
fdescfs vfs: remove cn_thread 2021-10-11 13:21:47 +00:00
fifofs fifos: delegate unhandled kqueue filters to underlying filesystem 2021-10-12 02:43:07 -05:00
fuse vfs: remove cn_thread 2021-10-11 13:21:47 +00:00
mntfs mntfs: lock mntfs pseudo devfs vnode properly 2021-11-13 01:00:41 +02:00
msdosfs msdosfs_rename: remove write-only variables 2021-10-20 21:29:49 +03:00
nfs pNFS: Add nfsstats counters for number of Layouts 2021-11-12 17:32:55 -08:00
nfsclient pNFS: Add nfsstats counters for number of Layouts 2021-11-12 17:32:55 -08:00
nfsserver pNFS: Add nfsstats counters for number of Layouts 2021-11-12 17:32:55 -08:00
nullfs nullfs: provide custom null_rename bypass 2021-07-27 19:58:48 +03:00
procfs procfs_doprocfile(): simplify 2021-11-04 06:13:47 +02:00
pseudofs pseudofs: use vget_prep + vget_finish instead of vget + the interlock 2021-05-19 17:58:42 +00:00
smbfs vfs: remove cn_thread 2021-10-11 13:21:47 +00:00
tmpfs tmpfs: remove write-only variables 2021-10-20 21:29:49 +03:00
udf
unionfs unionfs: fix potential deadlock in VOP_RMDIR 2021-11-14 20:07:42 -08:00