Subject: kern/6241: kernel panics by mkdir() system-call
To: None <gnats-bugs@gnats.netbsd.org>
From: None <fujiyosi@infor.kanazawa-it.ac.jp>
List: netbsd-bugs
Date: 10/04/1998 18:18:59
>Number:         6241
>Category:       kern
>Synopsis:       kernel panics by mkdir() system-call
>Confidential:   yes
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct  4 02:20:00 1998
>Last-Modified:
>Originator:     Takeshi Fujihoshi
>Organization:
Takeshi Fujiyosi	fujiyosi@infor.kanazawa-it.ac.jp
>Release:        NetBSD-current 98/09/22
>Environment:
	
System: NetBSD hr 1.3H NetBSD 1.3H (HR04) #1: Tue Sep 22 21:58:45 JST 1998 fujiyosi@hr:/src/src/sys/arch/i386/compile/HR04 i386


>Description:
	When a symbolic-link exists, kernel panics by using mkdir()
	system-call to make a directory which has the same path-name
	as the symbolic-link has.  However, it happens only if the
	path-name of the directory has '/' as the last character.

>How-To-Repeat:

	$ ln -s YYY XXX
	$ cc foo.c
	$ a.out
	panic: lockmgr: locking against myself
	Stopped in a.out at     _Debugger+0x4:  leave
	db>

	The content of the foo.c:

		#include <sys/types.h>
		#include <sys/stat.h>
	
		main()
		{
		    mkdir("XXX/", S_IRWXU);
		}


>Fix:
>Audit-Trail:
>Unformatted: