Date: Mon, 22 Oct 2001 18:35:51 +0400 From: "Vladimir B.Grebenschikov" <vova@express.ru> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/31432: umount(8) and unmount(2) don't corespond by semantic Message-ID: <E15vgBD-00018e-00@vbook.express.ru>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E15vgBD-00018e-00>