NetBSD Problem Report #39947

From www@NetBSD.org  Tue Nov 18 10:33:56 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 EE5AE63BC49
	for <gnats-bugs@gnats.netbsd.org>; Tue, 18 Nov 2008 10:33:55 +0000 (UTC)
Message-Id: <20081118103355.BA9DF63B874@narn.NetBSD.org>
Date: Tue, 18 Nov 2008 10:33:55 +0000 (UTC)
From: xtraeme@gmail.com
Reply-To: xtraeme@gmail.com
To: gnats-bugs@NetBSD.org
Subject: dbcool(4): sysmon_envsys_destroy() called twice in detach method
X-Send-Pr-Version: www-1.0

>Number:         39947
>Category:       kern
>Synopsis:       dbcool(4): sysmon_envsys_destroy() called twice in detach method
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    jnemeth
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 18 10:35:00 +0000 2008
>Closed-Date:    Thu Nov 20 04:47:08 +0000 2008
>Last-Modified:  Thu Nov 20 04:47:08 +0000 2008
>Originator:     Juan RP
>Release:        Latest
>Organization:
>Environment:
NetBSD nocturno 5.99.02 NetBSD 5.99.02 (MASTER) #0: Tue Nov 18 10:04:43 CET 2008  juan@nocturno:/mnt/raid/build/i386/obj/sys/arch/i386/compile/MASTER i386
>Description:
The dbcool driver calls sysmon_envsys_destroy() twice in the
detach method:

static int
dbcool_detach(device_t self, int flags)
{
        struct dbcool_softc *sc = device_private(self);

        sysmon_envsys_unregister(sc->sc_sme);
        sysmon_envsys_destroy(sc->sc_sme);
        sc->sc_sme = NULL;
        return 0;
}

because sysmon_envsys_unregister() calls sysmon_envsys_destroy() by
itself.
>How-To-Repeat:

>Fix:
Remove the sysmon_envsys_destroy() call in detach function.

>Release-Note:

>Audit-Trail:
From: John Nemeth <jnemeth@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/39947 CVS commit: src/sys/dev/i2c
Date: Tue, 18 Nov 2008 10:49:45 +0000 (UTC)

 Module Name:	src
 Committed By:	jnemeth
 Date:		Tue Nov 18 10:49:45 UTC 2008

 Modified Files:
 	src/sys/dev/i2c: dbcool.c

 Log Message:
 PR/39947 - Juan RP -- dbcool_detach implicitly called
   sysmon_envsys_destroy() twice


 To generate a diff of this commit:
 cvs rdiff -r1.5 -r1.6 src/sys/dev/i2c/dbcool.c

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

Responsible-Changed-From-To: kern-bug-people->jnemeth
Responsible-Changed-By: jnemeth@NetBSD.org
Responsible-Changed-When: Tue, 18 Nov 2008 11:18:48 +0000
Responsible-Changed-Why:
I'm handling it.


State-Changed-From-To: open->pending-pullups
State-Changed-By: jnemeth@NetBSD.org
State-Changed-When: Wed, 19 Nov 2008 01:02:07 +0000
State-Changed-Why:
[pullup-5 #82] dbcool.c


From: Soren Jacobsen <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/39947 CVS commit: [netbsd-5] src/sys/dev/i2c
Date: Thu, 20 Nov 2008 03:08:02 +0000 (UTC)

 Module Name:	src
 Committed By:	snj
 Date:		Thu Nov 20 03:08:02 UTC 2008

 Modified Files:
 	src/sys/dev/i2c [netbsd-5]: dbcool.c

 Log Message:
 Pull up following revision(s) (requested by jnemeth in ticket #82):
 	sys/dev/i2c/dbcool.c: revision 1.6
 PR/39947 - Juan RP -- dbcool_detach implicitly called
 sysmon_envsys_destroy() twice


 To generate a diff of this commit:
 cvs rdiff -r1.5 -r1.5.6.1 src/sys/dev/i2c/dbcool.c

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

State-Changed-From-To: pending-pullups->closed
State-Changed-By: jnemeth@NetBSD.org
State-Changed-When: Thu, 20 Nov 2008 04:47:08 +0000
State-Changed-Why:
Pullups completed.  Thanks for the PR!


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