git: kernel - Fix umount -f related panic

Matthew Dillon dillon at crater.dragonflybsd.org
Tue Dec 19 19:20:38 PST 2023


commit 44a20c7f35de6ac28d870a45c6c2d8d79c34a054
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Tue Dec 19 19:14:23 2023 -0800

    kernel - Fix umount -f related panic
    
    * Adjust umount -f (forced unmount) logic to kill processes which
      still hold references to the mount in question, due to being chrooted
      or jailed in the mount, their current directory being on the mount,
      or having any open file via the mount.
    
      To be frank, it is hard to find a nice way to rip a mount out from under
      processes as their behavior upon suddenly having file descriptors go bad
      is completely non-deterministic.  A forced unmount is not supposed to be
      kind to the system.  The best solution is to kill the processes.
    
    * Fixes panics related to regular use of umount -f if the operation
      happens to race active operations by processes on the mount.
    
    Reported-by: marino

Summary of changes:
 sys/kern/vfs_syscalls.c | 90 +++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 83 insertions(+), 7 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/44a20c7f35de6ac28d870a45c6c2d8d79c34a054


-- 
DragonFly BSD source repository


More information about the Commits mailing list