NetBSD Problem Report #45113

From jruohone@gmail.com  Mon Jul  4 03:31:54 2011
Return-Path: <jruohone@gmail.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 1338463BA51
	for <gnats-bugs@gnats.netbsd.org>; Mon,  4 Jul 2011 03:31:54 +0000 (UTC)
Message-Id: <20110704033147.17C2656C5@marx.bitnet>
Date: Mon,  4 Jul 2011 06:31:46 +0300 (EEST)
From: Jukka Ruohonen <jruohonen@iki.fi>
Sender: a b <jruohone@gmail.com>
Reply-To: jruohonen@iki.fi
To: gnats-bugs@gnats.NetBSD.org
Subject: invalid mknod(2) call succeeds
X-Send-Pr-Version: 3.95

>Number:         45113
>Category:       kern
>Synopsis:       invalid mknod(2) call succeeds
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 04 03:35:00 +0000 2011
>Closed-Date:    Thu Jul 07 07:36:19 +0000 2011
>Last-Modified:  Thu Jul 07 07:36:19 +0000 2011
>Originator:     Jukka Ruohonen
>Release:        5.99.54
>Organization:
none
>Environment:
>Description:

The following call fails on tmpfs but succeeds on ffs:

	mknod("foobar", -1, 0);

>How-To-Repeat:

Code testing.

>Fix:

Make it fail also on ffs.

>Release-Note:

>Audit-Trail:
From: "Jukka Ruohonen" <jruoho@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/45113 CVS commit: src/tests/syscall
Date: Mon, 4 Jul 2011 03:52:11 +0000

 Module Name:	src
 Committed By:	jruoho
 Date:		Mon Jul  4 03:52:11 UTC 2011

 Modified Files:
 	src/tests/syscall: t_mknod.c

 Log Message:
 Put the previous check back and point to PR kern/45113. Also check whether
 _PATH_DEVNULL exists before attempting to obtain EEXIST from mknod(2).


 To generate a diff of this commit:
 cvs rdiff -u -r1.4 -r1.5 src/tests/syscall/t_mknod.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "J. Hannken-Illjes" <hannken@eis.cs.tu-bs.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/45113: invalid mknod(2) call succeeds
Date: Mon, 4 Jul 2011 11:09:20 +0200

 At least for ffs this is not an error.  Mode S_IFMT (all one) is used for
 bad sector management -- see sbin/badsect/badsect.c line 187 for example.

 --
 Juergen Hannken-Illjes - hannken@eis.cs.tu-bs.de - TU Braunschweig (Germany)

From: Jukka Ruohonen <jruohonen@iki.fi>
To: gnats-bugs@NetBSD.org
Cc: "J. Hannken-Illjes" <hannken@eis.cs.tu-bs.de>,
	David Holland <dholland-bugs@NetBSD.org>
Subject: Re: kern/45113: invalid mknod(2) call succeeds
Date: Mon, 4 Jul 2011 12:21:58 +0300

 On Mon, Jul 04, 2011 at 09:10:06AM +0000, J. Hannken-Illjes wrote:
 >  At least for ffs this is not an error.  Mode S_IFMT (all one) is used for
 >  bad sector management -- see sbin/badsect/badsect.c line 187 for example.

 Thanks for clarification. I do not know much about file systems -- maybe
 dholland@ could comment?

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/45113: invalid mknod(2) call succeeds
Date: Tue, 5 Jul 2011 00:43:36 +0000

 On Mon, Jul 04, 2011 at 09:25:02AM +0000, Jukka Ruohonen wrote:
  >>  At least for ffs this is not an error.  Mode S_IFMT (all one) is used for
  >>  bad sector management -- see sbin/badsect/badsect.c line 187 for example.
  >  
  > Thanks for clarification. I do not know much about file systems -- maybe
  > dholland@ could comment?

 Blah, that's gross. Can we insert something into stat.h to alert
 people to this behavior so it doesn't get broken by accident?

 -- 
 David A. Holland
 dholland@netbsd.org

From: "Jukka Ruohonen" <jruoho@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/45113 CVS commit: src/tests/syscall
Date: Tue, 5 Jul 2011 04:33:23 +0000

 Module Name:	src
 Committed By:	jruoho
 Date:		Tue Jul  5 04:33:23 UTC 2011

 Modified Files:
 	src/tests/syscall: t_mknod.c

 Log Message:
 Remove the xfail check after all (PR kern/45113 is bogus or fs-dependent).


 To generate a diff of this commit:
 cvs rdiff -u -r1.7 -r1.8 src/tests/syscall/t_mknod.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: jruoho@NetBSD.org
State-Changed-When: Thu, 07 Jul 2011 07:36:19 +0000
State-Changed-Why:

Closed as invalid. However, as noted, it would be worthwhile to at least
document these special cases.



>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.