NetBSD Problem Report #39493

From www@NetBSD.org  Sat Sep  6 17:45:16 2008
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id CC19963B853
	for <gnats-bugs@gnats.netbsd.org>; Sat,  6 Sep 2008 17:45:15 +0000 (UTC)
Message-Id: <20080906174515.9F3DF63B11D@narn.NetBSD.org>
Date: Sat,  6 Sep 2008 17:45:15 +0000 (UTC)
From: xtraeme@gmail.com
Reply-To: xtraeme@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Common global symbol defined twice: specfs_lock
X-Send-Pr-Version: www-1.0

>Number:         39493
>Category:       kern
>Synopsis:       Common global symbol defined twice: specfs_lock
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    tron
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Sep 06 17:50:00 +0000 2008
>Closed-Date:    Sun Sep 07 13:13:44 +0000 2008
>Last-Modified:  Tue Sep 09 19:25:01 +0000 2008
>Originator:     Juan RP
>Release:        Latest
>Organization:
>Environment:
NetBSD vmware-netbsd 4.99.72 NetBSD 4.99.72 (MASTER) #13: Sat Sep  6 19:20:40 CEST 2008  juan@vmware-netbsd:/home/juan/build/obj/sys/arch/i386/compile/MASTER i386
>Description:
When linking the kernel with --warn-common, a warning of a common global symbol of the same size was found for 'specfs_lock'.

specfs_lock is declared as extern in sys/miscfs/specfs/specdev.h.
specfs_lock is defined as global in sys/miscfs/specfs/specfs_vnops.c.
specfs_lock is defined as global in sys/kern/vfs_subr.c.

Therefore only a definition is needed... I chose to remove the one from
vfs_subr.c.


>How-To-Repeat:
Code inspection.
>Fix:
Index: kern/vfs_subr.c
===================================================================
RCS file: /cvsroot/src/sys/kern/vfs_subr.c,v
retrieving revision 1.355
diff -b -u -p -r1.355 vfs_subr.c
--- kern/vfs_subr.c     31 Jul 2008 05:38:05 -0000      1.355
+++ kern/vfs_subr.c     6 Sep 2008 17:27:28 -0000
@@ -161,7 +161,6 @@ kmutex_t mountlist_lock;
 kmutex_t mntid_lock;
 kmutex_t mntvnode_lock;
 kmutex_t vnode_free_list_lock;
-kmutex_t specfs_lock;
 kmutex_t vfs_list_lock;

 static pool_cache_t vnode_cache;

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->tron
Responsible-Changed-By: tron@NetBSD.org
Responsible-Changed-When: Sun, 07 Sep 2008 12:32:22 +0000
Responsible-Changed-Why:
I'll handle this PR.


From: Matthias Scheler <tron@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/39493 CVS commit: src/sys/kern
Date: Sun,  7 Sep 2008 13:09:37 +0000 (UTC)

 Module Name:	src
 Committed By:	tron
 Date:		Sun Sep  7 13:09:36 UTC 2008

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

 Log Message:
 Remove duplicate definition of "specfs_lock".
 Patch provided by Juan RP in PR kern/39493.


 To generate a diff of this commit:
 cvs rdiff -r1.355 -r1.356 src/sys/kern/vfs_subr.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: tron@NetBSD.org
State-Changed-When: Sun, 07 Sep 2008 13:13:44 +0000
State-Changed-Why:
I've committed your patch. Thanks a lot for the bug report.


From: Matthias Scheler <tron@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/39493 CVS commit: src/sys/rump/librump/rumpkern
Date: Tue,  9 Sep 2008 19:22:00 +0000 (UTC)

 Module Name:	src
 Committed By:	tron
 Date:		Tue Sep  9 19:22:00 UTC 2008

 Modified Files:
 	src/sys/rump/librump/rumpkern: specfs.c

 Log Message:
 Fix build problem with puffs enabled caused by the fix for PR kern/39493.
 Problem noted by Thomas Klausner, patch provided by Juan RP.


 To generate a diff of this commit:
 cvs rdiff -r1.25 -r1.26 src/sys/rump/librump/rumpkern/specfs.c

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

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