From owner-freebsd-bugs Mon Oct 22 7:40: 6 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2124A37B405 for ; Mon, 22 Oct 2001 07:40:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f9MEe1Z03797; Mon, 22 Oct 2001 07:40:01 -0700 (PDT) (envelope-from gnats) Received: from vbook.express.ru (asplinux.ru [195.133.213.194]) by hub.freebsd.org (Postfix) with ESMTP id DFC7837B401 for ; Mon, 22 Oct 2001 07:35:04 -0700 (PDT) Received: from vova by vbook.express.ru with local (Exim 3.31 #2) id 15vgBD-00018e-00 for FreeBSD-gnats-submit@freebsd.org; Mon, 22 Oct 2001 18:35:51 +0400 Message-Id: Date: Mon, 22 Oct 2001 18:35:51 +0400 From: "Vladimir B.Grebenschikov" Reply-To: "Vladimir B.Grebenschikov" To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/31432: umount(8) and unmount(2) don't corespond by semantic Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 31432 >Category: bin >Synopsis: umount(8) and unmount(2) don't corespond by semantic >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Oct 22 07:40:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Vladimir B. Grebenschikov >Release: FreeBSD 5.0-CURRENT i386, FreeBSD 4.4-RELEASE i386 >Organization: SW Soft >Environment: System: FreeBSD vbook.express.ru 5.0-CURRENT FreeBSD 5.0-CURRENT #8: Mon Oct 22 11:34:30 MSD 2001 vova@walder:/usr/obj/ext/current/src/sys/VBOOK i386 >Description: umount(8) first tries to lookup a mountpoint in result list returned by getfsstat() then, if found, calls unmount(2). If any directory component above mountpoint was renamed, it is not possible to unmount this mountpoint because lookup fails. So unmount(2) needs real directory corresponding to the mountpoint to be unmounted, but umount(8) tries to compare it with list of paths saved by mount(2) and fails in case of rename. >How-To-Repeat: # mount -t linprocfs none /tmp/x/y # mv /tmp/x /tmp/z # umount /tmp/z/y umount: /tmp/z/y not found in mount table, unmounted it anyway # umount /tmp/x/y umount: unmount of /usr/tmp/x/y failed: No such file or directory # cat > um.c main(int ac, char **av) { unmount(av[1], 0); } ^D # gcc um.c # ./a.out /tmp/z/y # mount | grep linproc # >Fix: Remove getfsstat() lookup in umount(8). >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message