https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251320

            Bug ID: 251320
           Summary: vfs_domount_first: do not crash on mount failure
           Product: Base System
           Version: 12.2-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: b...@freebsd.org
          Reporter: ztong0...@gmail.com

Created attachment 219896
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=219896&action=edit
patch

vfs_write_suspend_umnt() expect a non-zero vfs_write_suspend_umnt,
otherwise it will panic, however in vfs_domount_first(), the counter
is zero when calling VFS_UNMOUNT()

 panic: vn_finished_write: neg cnt
 cpuid = 7
 time = 1606004193
 KDB: stack backtrace:
 #0 0xffffffff80c0a8f5 at kdb_backtrace+0x65
 freebsd#1 0xffffffff80bbeb1b at vpanic+0x17b
 freebsd#2 0xffffffff80bbe993 at panic+0x43
 freebsd#3 0xffffffff80c9da05 at vn_finished_write+0xc5
 freebsd#4 0xffffffff80c9f726 at vfs_write_suspend_umnt+0x16
 freebsd#5 0xffffffff80ecdd31 at ffs_unmount+0x71
 freebsd#6 0xffffffff80c844dd at vfs_domount+0xc0d
 freebsd#7 0xffffffff80c83228 at vfs_donmount+0x988
 freebsd#8 0xffffffff80c82871 at sys_nmount+0x71
 freebsd#9 0xffffffff810904c7 at amd64_syscall+0x387
 freebsd#10 0xffffffff8106785e at fast_syscall_common+0xf8
 Uptime: 2h10m11s

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to