NetBSD Problem Report #37808

From martin@duskware.de  Sat Jan 19 15:40:17 2008
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id E818F63B90D
	for <gnats-bugs@gnats.netbsd.org>; Sat, 19 Jan 2008 15:40:16 +0000 (UTC)
Message-Id: <20080119145813.4194663B90D@narn.NetBSD.org>
Date: Sat, 19 Jan 2008 14:58:13 +0000 (UTC)
From: pooka@iki.fi
Reply-To: pooka@iki.fi
To: netbsd-bugs-owner@NetBSD.org
Subject: vn_setrecurse violates abstractions
X-Send-Pr-Version: www-1.0

>Number:         37808
>Category:       kern
>Synopsis:       vn_setrecurse violates abstractions
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          analyzed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 19 15:45:00 +0000 2008
>Closed-Date:    
>Last-Modified:  Tue Feb 05 15:27:36 +0000 2008
>Originator:     Antti Kantee
>Release:        4.99.49
>Organization:
>Environment:
>Description:
vn_setrecurse assumes that each file system exports a lock pointer.
As long as VOP_LOCK remains, anything outside the file system should
not attempt to interpret locking parameters.
>How-To-Repeat:
Try to call vn_setrecurse on a file system which does not export a lock.
>Fix:
workaround: use v_lock if v_vnlock is not available.  However, this
is not an acceptable fix.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->ad
Responsible-Changed-By: ad@narn.netbsd.org
Responsible-Changed-When: Thu, 24 Jan 2008 16:51:11 +0000
Responsible-Changed-Why:
take


State-Changed-From-To: open->analyzed
State-Changed-By: ad@narn.netbsd.org
State-Changed-When: Thu, 24 Jan 2008 16:51:11 +0000
State-Changed-Why:
I bet this came in with softdep.


From: Andrew Doran <ad@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/37808 CVS commit: src/sys/kern
Date: Fri, 25 Jan 2008 14:37:33 +0000 (UTC)

 Module Name:	src
 Committed By:	ad
 Date:		Fri Jan 25 14:37:33 UTC 2008

 Modified Files:
 	src/sys/kern: vfs_vnops.c

 Log Message:
 vn_setrecurse: if no lock is exported, use v_lock. Works around issue
 described in PR kern/37808. The ideal solution here is to kill vnode
 lock recursion, which should not be hard once it is understood what
 the two remaining callers of vn_setrecurse() are doing.


 To generate a diff of this commit:
 cvs rdiff -r1.152 -r1.153 src/sys/kern/vfs_vnops.c

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

Responsible-Changed-From-To: ad->kern-bug-people
Responsible-Changed-By: ad@narn.netbsd.org
Responsible-Changed-When: Tue, 05 Feb 2008 15:27:36 +0000
Responsible-Changed-Why:
I committed a workaround.
Clean fix requires and overhaul of vnode locking and removal of the need
for recursive locking (there are very few sites left where this is done).


>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.