NetBSD Problem Report #36681

From martin@duskware.de  Mon Jul 23 09:46:37 2007
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 6096063B874
	for <gnats-bugs@gnats.netbsd.org>; Mon, 23 Jul 2007 09:46:37 +0000 (UTC)
Message-Id: <20070723094606.D1D0D63B874@narn.NetBSD.org>
Date: Mon, 23 Jul 2007 09:46:06 +0000 (UTC)
From: pooka@iki.fi
Reply-To: pooka@iki.fi
To: netbsd-bugs-owner@NetBSD.org
Subject: tmpfs rename potential locking problem
X-Send-Pr-Version: www-1.0

>Number:         36681
>Category:       kern
>Synopsis:       tmpfs rename potential locking problem
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    riastradh
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 23 09:50:00 +0000 2007
>Closed-Date:    Sun Aug 21 04:29:43 +0000 2011
>Last-Modified:  Sun Aug 21 04:29:43 +0000 2011
>Originator:     Antti Kantee
>Release:        4.99.25
>Organization:
>Environment:
>Description:
tmpfs_rename locks fdvp.  In case fdvp is on the path from tdvp to root (e.g. mv foo ..), this is a locking order violation and could cause a deadlock.
>How-To-Repeat:
code inspection
>Fix:
none provided

>Release-Note:

>Audit-Trail:
From: Antti Kantee <pooka@iki.fi>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/36681: tmpfs rename potential locking problem
Date: Mon, 23 Jul 2007 12:57:12 +0300

 On Mon Jul 23 2007 at 09:50:00 +0000, pooka@iki.fi wrote:
 > (e.g. mv foo ..)

 Err, I obviously meant: mv foo bar/

 -- 
 Antti Kantee <pooka@iki.fi>                     Of course he runs NetBSD
 http://www.iki.fi/pooka/                          http://www.NetBSD.org/
     "la qualité la plus indispensable du cuisinier est l'exactitude"

Responsible-Changed-From-To: kern-bug-people->dholland
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Sun, 30 Nov 2008 12:48:10 +0000
Responsible-Changed-Why:
rename issues are mine


From: Antti Kantee <pooka@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/36681 CVS commit: src/tests/fs/tmpfs
Date: Sun, 4 Jul 2010 12:43:23 +0000

 Module Name:	src
 Committed By:	pooka
 Date:		Sun Jul  4 12:43:23 UTC 2010

 Modified Files:
 	src/tests/fs/tmpfs: t_renamerace.c

 Log Message:
 Add a test case for PR kern/36681 demonstrating how easy it is to
 get tmpfs rename to "tstile".

 Note1: triggering this on any non-SMP system is not as easy (because
 one system call tends to run from start to finish in one go) and
 therefore I've limited it to i386 and amd64.  Incidentally, I'm
 still waiting for the eternally elusive MI CPU_INFO_FOREACH (or at
 least something else than a stupid macro) ...

 Note2: this is a "race condition" test.  I tested it on my development
 host and in qemu and it triggers pretty instantly.  But YMMV.


 To generate a diff of this commit:
 cvs rdiff -u -r1.6 -r1.7 src/tests/fs/tmpfs/t_renamerace.c

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

From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/36681 CVS commit: src/sys/fs/tmpfs
Date: Thu, 18 Aug 2011 21:42:19 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Thu Aug 18 21:42:19 UTC 2011

 Modified Files:
 	src/sys/fs/tmpfs: tmpfs_vnops.c

 Log Message:
 Fix tmpfs_rename locking.

 Fixes PR kern/36681.  tmpfs now survives dirconc, all our vfs/tmpfs
 tests and rename races in atf, and a bunch of hand-written tests
 that I'd commit if atf didn't find them highly indigestible.

 ok dholland


 To generate a diff of this commit:
 cvs rdiff -u -r1.88 -r1.89 src/sys/fs/tmpfs/tmpfs_vnops.c

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

From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/36681 CVS commit: src/tests/fs/tmpfs
Date: Thu, 18 Aug 2011 21:44:55 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Thu Aug 18 21:44:55 UTC 2011

 Modified Files:
 	src/tests/fs/tmpfs: t_renamerace.c

 Log Message:
 No more xfail for PR kern/36681.


 To generate a diff of this commit:
 cvs rdiff -u -r1.12 -r1.13 src/tests/fs/tmpfs/t_renamerace.c

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

Responsible-Changed-From-To: dholland->riastradh
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Sun, 21 Aug 2011 04:29:43 +0000
Responsible-Changed-Why:
riastradh actually prepared the patch and fixed it.


State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 21 Aug 2011 04:29:43 +0000
State-Changed-Why:
fixed.


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