From owner-cvs-sys Fri Nov 21 22:13:01 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id WAA15559 for cvs-sys-outgoing; Fri, 21 Nov 1997 22:13:01 -0800 (PST) (envelope-from owner-cvs-sys) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id WAA15403; Fri, 21 Nov 1997 22:11:00 -0800 (PST) (envelope-from bde@FreeBSD.org) From: Bruce Evans Received: (from bde@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id WAA11558; Fri, 21 Nov 1997 22:10:37 -0800 (PST) Date: Fri, 21 Nov 1997 22:10:37 -0800 (PST) Message-Id: <199711220610.WAA11558@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-sys@FreeBSD.ORG Subject: cvs commit: src/sys/kern vfs_syscalls.c Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk bde 1997/11/21 22:10:37 PST Modified files: sys/kern vfs_syscalls.c Log: Fixed rev.1.81. mp->mnt_kern_flag was restored in the non-error case of `mount -u'. This only matters for `mount -u' competing with unmounts. If I understand the locking correctly: if mount() blocks, then unmount() may run and set mp->kern_flag for the same mp. Then unmount() blocks waiting for mount() to finish. When unmount() continues, its MNTK flags (MNTK_UNMOUNT and MNTK_MWAIT) may have been clobbered. Didn't fix old bugs: - restoring mp->mnt_kern_flag is wrong for the same reasons in the error case. - the error case of unmount() seems to be broken too: (a) MNTK_UNMOUNT gets clobbered, although another unmount() may have set it. Perhaps it shouldn't be set until after the full lock is aquired. (b) MNTK_MWAIT isn't honoured. Fixed a nearby style bug. Revision Changes Path 1.83 +4 -3 src/sys/kern/vfs_syscalls.c