Subject: kern/6241: kernel panics by mkdir() system-call
To: None <>
From: None <>
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
>Originator:     Takeshi Fujihoshi
Takeshi Fujiyosi
>Release:        NetBSD-current 98/09/22
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

	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.


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

	The content of the foo.c:

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