Author: mjg
Date: Fri Jul 10 09:24:27 2020
New Revision: 363072
URL: https://svnweb.freebsd.org/changeset/base/363072

Log:
  vfs: fix early termination of kern_getfsstat
  
  The kernel would unlock already unlocked mutex if the buffer got filled up
  before the mount list ended.
  
  Reported by:  pho
  Fixes:        r363069 ("vfs: depessimize getfsstat when only the count is 
requested")

Modified:
  head/sys/kern/vfs_syscalls.c

Modified: head/sys/kern/vfs_syscalls.c
==============================================================================
--- head/sys/kern/vfs_syscalls.c        Fri Jul 10 09:01:36 2020        
(r363071)
+++ head/sys/kern/vfs_syscalls.c        Fri Jul 10 09:24:27 2020        
(r363072)
@@ -551,7 +551,7 @@ restart:
 
                if (count == maxcount) {
                        vfs_unbusy(mp);
-                       break;
+                       goto out;
                }
 
                mtx_lock(&mountlist_mtx);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to