From owner-freebsd-bugs@FreeBSD.ORG Thu Nov 27 13:20:15 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD62016A4CE for ; Thu, 27 Nov 2003 13:20:15 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E78BA43FB1 for ; Thu, 27 Nov 2003 13:20:13 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id hARLKDFY055194 for ; Thu, 27 Nov 2003 13:20:13 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id hARLKDVo055193; Thu, 27 Nov 2003 13:20:13 -0800 (PST) (envelope-from gnats) Resent-Date: Thu, 27 Nov 2003 13:20:13 -0800 (PST) Resent-Message-Id: <200311272120.hARLKDVo055193@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andreas Fuchs Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 626D416A4CE for ; Thu, 27 Nov 2003 13:15:46 -0800 (PST) Received: from beaver.boinkor.net (212-88-187-152.ADSL.ycn.com [212.88.187.152]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6755943FA3 for ; Thu, 27 Nov 2003 13:15:44 -0800 (PST) (envelope-from asf@beaver.boinkor.net) Received: from beaver.boinkor.net (localhost [127.0.0.1]) by beaver.boinkor.net (8.12.10/8.12.10) with ESMTP id hARLFg6a005213 for ; Thu, 27 Nov 2003 22:15:42 +0100 (CET) (envelope-from asf@beaver.boinkor.net) Received: (from asf@localhost) by beaver.boinkor.net (8.12.10/8.12.10/Submit) id hARLFfIh005212; Thu, 27 Nov 2003 22:15:41 +0100 (CET) (envelope-from asf) Message-Id: <200311272115.hARLFfIh005212@beaver.boinkor.net> Date: Thu, 27 Nov 2003 22:15:41 +0100 (CET) From: Andreas Fuchs To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/59739: rmdir(2) and mkdir(2) both return EISDIR for argument "/" X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Andreas Fuchs List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2003 21:20:15 -0000 >Number: 59739 >Category: kern >Synopsis: rmdir(2) and mkdir(2) both return EISDIR for argument "/" >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Nov 27 13:20:13 PST 2003 >Closed-Date: >Last-Modified: >Originator: Andreas Fuchs >Release: FreeBSD 5.2-BETA i386 >Organization: >Environment: System: FreeBSD beaver.boinkor.net 5.2-BETA FreeBSD 5.2-BETA #6: Thu Nov 27 00:06:50 CET 2003 root@:/usr/obj/usr/src/sys/BOINKINE i386 >Description: Calling rmdir or mkdir on "/" returns EISDIR, but calling them on any other mount point name returns the documented and correct return value (EBUSY for rmdir and EEXIST for mkdir). This seems to affect only the literal value "/". Using "/etc/.." (where "etc" is a regular directory, just to be sure) yields the correct result. >How-To-Repeat: # rmdir / rmdir: /: Is a directory # rmdir /usr rmdir: /usr: Device busy # rmdir /etc/.. rmdir: /etc/..: Device busy same for mkdir: # mkdir / mkdir: /: Is a directory # mkdir /usr mkdir: /usr: File exists # mkdir /etc/.. mkdir: /etc/..: File exists (where /etc is not a mount point, so /etc/.. would be the root directory) I could repeat this on 5.2-BETA and 4.9-STABLE. >Fix: I /think/ the problem lies somewhere in namei() (or lookup() from there) calls from rmdir and mkdir, but neither am I a kernel hacker nor could I find the bug in there. This is all rather speculative, so I can't really offer a fix - sorry. >Release-Note: >Audit-Trail: >Unformatted: