NetBSD Problem Report #49697

From www@NetBSD.org  Thu Feb 26 09:51:54 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 0C037A57FE
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 26 Feb 2015 09:51:54 +0000 (UTC)
Message-Id: <20150226095153.0433FA654B@mollari.NetBSD.org>
Date: Thu, 26 Feb 2015 09:51:53 +0000 (UTC)
From: ozaki-r@netbsd.org
Reply-To: ozaki-r@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: Inconsistency between module and internal names of sdt and fbt
X-Send-Pr-Version: www-1.0

>Number:         49697
>Category:       kern
>Synopsis:       Inconsistency between module and internal names of sdt and fbt
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 26 09:55:00 +0000 2015
>Closed-Date:    Fri Jun 26 05:40:46 +0000 2015
>Last-Modified:  Fri Jun 26 05:40:46 +0000 2015
>Originator:     Ryota Ozaki
>Release:        current (7.99.5)
>Organization:
>Environment:
NetBSD kvm 7.99.5 NetBSD 7.99.5 (KVM) #122: Wed Feb 25 11:52:26 JST 2015  ozaki-r@(hidden)
>Description:
sdt.kmod and fbt.kmod were renamed to dtrace_sdt.kmod and dtrace_fbt.kmo respectively.
However, their names inside the kernel are still "sdt" and "fbt". For this reason, when we
load and unload the modules, we need to specify different names:

  modload dtrace_sdt
  modunload sdt

We should uniform them.

>How-To-Repeat:
# modload dtrace_sdt
# modunload dtrace_sdt
WARNING: module error: module `dtrace_sdt' not found
modunload: No such file or directory
# modunload sdt
# 
>Fix:
A fix for the issue is like this:

diff --git a/external/cddl/osnet/dev/sdt/sdt.c b/external/cddl/osnet/dev/sdt/sdt.c
index 3ebd4e5..f1620fb 100644
--- a/external/cddl/osnet/dev/sdt/sdt.c
+++ b/external/cddl/osnet/dev/sdt/sdt.c
@@ -450,7 +450,7 @@ sdt_unload(void)
 }

 static int
-sdt_modcmd(modcmd_t cmd, void *data)
+dtrace_sdt_modcmd(modcmd_t cmd, void *data)
 {
        int bmajor = -1, cmajor = -1;

@@ -473,4 +473,4 @@ sdt_open(dev_t dev, int flags, int mode, struct lwp *l)
        return (0);
 }

-MODULE(MODULE_CLASS_MISC, sdt, "dtrace");
+MODULE(MODULE_CLASS_MISC, dtrace_sdt, "dtrace");

>Release-Note:

>Audit-Trail:
From: "Ryota Ozaki" <ozaki-r@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49697 CVS commit: src/external/cddl/osnet/dev
Date: Thu, 26 Feb 2015 10:31:52 +0000

 Module Name:	src
 Committed By:	ozaki-r
 Date:		Thu Feb 26 10:31:52 UTC 2015

 Modified Files:
 	src/external/cddl/osnet/dev/fbt: fbt.c
 	src/external/cddl/osnet/dev/sdt: sdt.c

 Log Message:
 Fix inconsistency between module and internal names of sdt and fbt

 PR 49697
 OK wiz@


 To generate a diff of this commit:
 cvs rdiff -u -r1.17 -r1.18 src/external/cddl/osnet/dev/fbt/fbt.c
 cvs rdiff -u -r1.10 -r1.11 src/external/cddl/osnet/dev/sdt/sdt.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: ozaki-r@NetBSD.org
State-Changed-When: Fri, 26 Jun 2015 05:40:46 +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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.