NetBSD Problem Report #322

From gnats  Tue Jul  5 11:22:27 1994
Received: from amiga.oscs.montana.edu (amiga.oscs.montana.edu [153.90.3.128]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id LAA19325 for <[email protected]>; Tue, 5 Jul 1994 11:22:19 -0700
Message-Id: <[email protected]>
Date: Tue, 5 Jul 1994 08:04:46 GMT
From: [email protected]
Reply-To: [email protected]
To: [email protected]
Subject: Panic when namecache disabled and DIAGNOSTIC option enabled
X-Send-Pr-Version: 3.2

>Number:         322
>Category:       kern
>Synopsis:       Panic when namecache disabled and DIAGNOSTIC option enabled
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 05 11:35:06 +0000 1994
>Closed-Date:    Tue Jul 05 22:00:20 +0000 1994
>Last-Modified:  
>Originator:     
>Release:        
>Organization:
"	"
>Environment:

System: NetBSD 0.9C NetBSD 0.9C (ZEUS) #940701.3: Sun Jul 3 21:47:08 1994 root@:/opt/sys/arch/amiga/compile/ZEUS amiga
Architecture: amiga

>Description:

	If name caching is disabled (doingcache = 0) and the kernel was
	compiled with DIAGNOSTIC, attempting to reference a file name
	that contains more than 31 (NCHNAMLEN), a panic will occur.  This
	occurs because the cache_lookup does not check for the name length
	> NCHNAMLEN and disable the enter.  The cache_enter is then called
	with that name and it will panic.  [Name caching was disabled in
	sources supped on July 1 and my kernel was built with the DIAGNOSTIC
	option.  A couple of the files in the src tree were longer than 31
	characters and caused my system to panic while trying to do a sup.]
>How-To-Repeat:

	Set doingcache = 0 in vfs_cache.c, add the DIAGNOSTIC option to
	the config file, and build a kernel.  Run that kernel and type in
	a file name with more than 31 characters.
>Fix:

	Either the check for NCHNAMLEN in cache_enter should be done after
	the test for doingcache, or the check for doingcache in cache_lookup
	should be done after the length check.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: cgd 
State-Changed-When: Tue Jul 5 15:00:20 PDT 1994 
State-Changed-Why:  
fixed.  neither suggestion was correct; one incorrectly incremented counters, 
the other led to a possible race condition. 
>Unformatted:


 	DIAGNOSTIC option and name cache disabled can cause panic

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.