From owner-svn-src-head@FreeBSD.ORG Wed Jul 3 17:35:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4D7DA180; Wed, 3 Jul 2013 17:35:18 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) by mx1.freebsd.org (Postfix) with ESMTP id 179FC1A8B; Wed, 3 Jul 2013 17:35:16 +0000 (UTC) Received: by mail-wi0-f169.google.com with SMTP id c10so6511276wiw.0 for ; Wed, 03 Jul 2013 10:35:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=gTuAYRUXyPCv0v+F+m/vSTzCWqzzTK+XKz2iL1dx9j0=; b=f+0Fa3Ne0VH13DyPZnR48alrLeU6F2jYGfm8S6BdsniudYk+rsfAhBHH0yVk9wNgXb t2amSoX6WBEfObJdI4YgZASoYiqaSt/CwyU9dRHq0e4BgrnHyOhku8WnFCtbPj/xgp85 uIuhWEDisW2zAYq8iQHaxl1ThxFeXRBK5YPmfQpfIeOp1zAX4yzxI1nKR65au01Alyvb +5zo3ilxxGlRUjOMD6lzyMFW+w85yemyCG8VVmM9ybZZ2pRO1Ajh4fzjKAxN2eHiEWmO GZs6bCHu0PIrkBGRXrMnf3feU+/t1m7rrdz5/bgHT6otsucUc0pumuaNF6VFyTf6d7iO Katg== MIME-Version: 1.0 X-Received: by 10.194.133.106 with SMTP id pb10mr1216634wjb.62.1372872916192; Wed, 03 Jul 2013 10:35:16 -0700 (PDT) Sender: markjdb@gmail.com Received: by 10.194.242.195 with HTTP; Wed, 3 Jul 2013 10:35:16 -0700 (PDT) In-Reply-To: References: <201305240329.r4O3TWnU016249@svn.freebsd.org> Date: Wed, 3 Jul 2013 13:35:16 -0400 X-Google-Sender-Auth: khPUuHRdNcUTr1IdeW9kXtvUBvo Message-ID: Subject: Re: svn commit: r250953 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace From: Mark Johnston To: Alan Somers Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Mark Johnston , Rui Paulo , src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2013 17:35:18 -0000 On Wed, Jul 3, 2013 at 1:28 PM, Alan Somers wrote: > This creates another panic on module unload when WITNESS is enabled, > because the module exits while holding the fasttrap_cleanup_mtx. This > patch fixes the problem. I'm not sure if the mtx_destroy() is > necessary, but I would feel dirty to leave it out. Does this patch > look good to you? Hi Alan, Sorry about that - I noticed this mistake recently and fixed it in r252493: http://svnweb.freebsd.org/base?view=revision&revision=252493 DTrace module unloading is now working properly for me with WITNESS enabled. Thanks, -Mark > > Index: sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c > =================================================================== > --- sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c (revision 252490) > +++ sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c (working copy) > @@ -2434,6 +2434,7 @@ > wakeup(&fasttrap_cleanup_cv); > mtx_sleep(&fasttrap_cleanup_drain, &fasttrap_cleanup_mtx, 0, "ftcld", > 0); > + mtx_unlock(&fasttrap_cleanup_mtx); > fasttrap_cleanup_proc = NULL; > > #ifdef DEBUG > @@ -2473,6 +2474,7 @@ > #if !defined(sun) > destroy_dev(fasttrap_cdev); > mutex_destroy(&fasttrap_count_mtx); > + mtx_destroy(&fasttrap_cleanup_mtx); > CPU_FOREACH(i) { > mutex_destroy(&fasttrap_cpuc_pid_lock[i]); > }