Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jul 2020 09:24:27 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r363072 - head/sys/kern
Message-ID:  <202007100924.06A9ORpG012640@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007100924.06A9ORpG012640>