[Bug 257522] msdosfs rename(2) deadlock

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 31 Jul 2021 23:39:45 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257522

Konstantin Belousov <kib@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kib@FreeBSD.org

--- Comment #1 from Konstantin Belousov <kib@FreeBSD.org> ---
msdosfs_rename() has the same issue as was present in ufs_rename() long time
ago.

First, relookup() cannot be used while any vnode is locked.  Instead, special
non-sleeping variant of msdosfs_lookup() needs to be made available and applied
there.  It is already coded (dd_ino != NULL for msdosfs_lookup_() I believe),
just needs to be exposed and applied.

Another issue is that function prologue must not use sleepable vn_lock()
when owning any other vnode lock.

Mostly, it needs to mimic the structure of ufs_rename() for acquiring all
three or four locks.

-- 
You are receiving this mail because:
You are the assignee for the bug.