From mi@aldan.algebra.com  Thu Feb  7 20:27:42 2002
Return-Path: <mi@aldan.algebra.com>
Received: from aldan.algebra.com (aldan.algebra.com [216.254.65.224])
	by hub.freebsd.org (Postfix) with ESMTP id E660237B419
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  7 Feb 2002 20:27:41 -0800 (PST)
Received: (from mi@localhost)
	by aldan.algebra.com (8.11.6/8.11.5) id g184Re284724;
	Thu, 7 Feb 2002 23:27:40 -0500 (EST)
	(envelope-from mi)
Message-Id: <200202080427.g184Re284724@aldan.algebra.com>
Date: Thu, 7 Feb 2002 23:27:40 -0500 (EST)
From: Mikhail Teterin <mi@aldan.algebra.com>
Reply-To: Mikhail Teterin <mi@aldan.algebra.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ``/bin/mkdir -p /'' fails
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         34727
>Category:       bin
>Synopsis:       ``/bin/mkdir -p /'' fails
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 07 20:30:00 PST 2002
>Closed-Date:    Tue Jun 25 01:50:54 PDT 2002
>Last-Modified:  Tue Jun 25 01:50:54 PDT 2002
>Originator:     Mikhail Teterin
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
Virtual Estates, Inc.
>Environment:

	The buildworld done on Feb 5.

>Description:
	For some reason, mkdir -p / fails...

	I thought, -p is supposed to make it exit quietly in case the
	requested directory already exists.

>How-To-Repeat:

	/bin/mkdir -p /
	mkdir: /: Is a directory

>Fix:
>Release-Note:
>Audit-Trail:

From: Mikhail Teterin <mi@aldan.algebra.com>
To: jkh@FreeBSD.org, zarzycki@FreeBSD.org
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: bin/34727: ``/bin/mkdir -p /'' fails (fwd)
Date: Thu, 7 Feb 2002 23:48:11 -0500 (EST)

 You are the prime suspects, gentlemen :-)
 
 ----------------------------
 revision 1.23
 date: 2002/02/05 21:55:12;  author: zarzycki;  state: Exp;  lines: +19 -16
 Fix the race between the stat() and the mkdir().
 Reviewed by:    jkh
 
 ----- Forwarded message from gnats-admin@FreeBSD.org -----
 
 You can access the state of your problem report at any time
 via this link:
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=34727
 
 >Category:       bin
 >Responsible:    freebsd-bugs
 >Synopsis:       ``/bin/mkdir -p /'' fails
 >Arrival-Date:   Thu Feb 07 20:30:00 PST 2002
 
 ----- End of forwarded message from gnats-admin@FreeBSD.org -----

From: Dave Zarzycki <zarzycki@FreeBSD.org>
To: Mikhail Teterin <mi@aldan.algebra.com>
Cc: jkh@FreeBSD.org, <zarzycki@FreeBSD.org>,
	<freebsd-gnats-submit@FreeBSD.org>
Subject: Re: bin/34727: ``/bin/mkdir -p /'' fails (fwd)
Date: Thu, 7 Feb 2002 21:15:45 -0800 (PST)

 On Thu, 7 Feb 2002, Mikhail Teterin wrote:
 
 > You are the prime suspects, gentlemen :-)
 
 Kernel bug.
 
 mkdir(/) returns -1 and sets errno to EISDIR.
 mkdir(/anyotherdirthatexists) returns -1 and sets errno to EEXIST.
 
 davez
 
 -- 
 Dave Zarzycki
 Darwin & Mac OS X
 Apple Computer, Inc.
 

From: Dave Zarzycki <zarzycki@FreeBSD.org>
To: Mikhail Teterin <mi@aldan.algebra.com>
Cc: jkh@FreeBSD.org, <zarzycki@FreeBSD.org>,
	<freebsd-gnats-submit@FreeBSD.org>
Subject: Re: bin/34727: ``/bin/mkdir -p /'' fails (fwd)
Date: Thu, 7 Feb 2002 21:15:45 -0800 (PST)

 On Thu, 7 Feb 2002, Mikhail Teterin wrote:
 
 > You are the prime suspects, gentlemen :-)
 
 Kernel bug.
 
 mkdir(/) returns -1 and sets errno to EISDIR.
 mkdir(/anyotherdirthatexists) returns -1 and sets errno to EEXIST.
 
 davez
 
 -- 
 Dave Zarzycki
 Darwin & Mac OS X
 Apple Computer, Inc.
 
State-Changed-From-To: open->closed 
State-Changed-By: tjr 
State-Changed-When: Tue Jun 25 01:48:42 PDT 2002 
State-Changed-Why:  
This bug was fixed by rev. 1.25 of mkdir.c 

http://www.freebsd.org/cgi/query-pr.cgi?pr=34727 
>Unformatted:
