From owner-svn-src-head@FreeBSD.ORG Wed Jul 3 17:37:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DD27932F; Wed, 3 Jul 2013 17:37:07 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-qa0-x234.google.com (mail-qa0-x234.google.com [IPv6:2607:f8b0:400d:c00::234]) by mx1.freebsd.org (Postfix) with ESMTP id 4C6FF1A9F; Wed, 3 Jul 2013 17:37:07 +0000 (UTC) Received: by mail-qa0-f52.google.com with SMTP id bv4so297099qab.4 for ; Wed, 03 Jul 2013 10:37:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=lt8VLKjfI9kE8+wH52KXs7GfDyXQFKAVWiO5zuR9xfo=; b=yd7r96Mq0MWnBxscr7xSQJb8CulG1qIGGDZEBJ51E+g8Ya97R2GeRE/ab4OABwaNWK 67Z1laPvyckoxjZL00CEn5xY/x9Kx+5r+aWMamdtGoZ1KmKQzeaFUK3pcvMjqX7I5XD+ 7vo7kD5X08WiUzSjswce8PGREYg/DCoQ0v/iKAwFvz0qxrKrEzyoCLaDq9zVp2xNa1fn apD/1jm3MyGHeFpJlqVpn2VlOi393jGnIpZnubdRzTRbUAnF9uR/aZrij11rXHo33b8K zas/mkE7MfGkMQ3irrmeE6k6AyuwnmSldgrb3uHml9eU4eYZiUIWSJT0D9tcOdBnyRp8 Dwqw== MIME-Version: 1.0 X-Received: by 10.229.31.202 with SMTP id z10mr662349qcc.36.1372873026785; Wed, 03 Jul 2013 10:37:06 -0700 (PDT) Received: by 10.49.37.226 with HTTP; Wed, 3 Jul 2013 10:37:06 -0700 (PDT) In-Reply-To: References: <201305240329.r4O3TWnU016249@svn.freebsd.org> Date: Wed, 3 Jul 2013 11:37:06 -0600 Message-ID: Subject: Re: svn commit: r250953 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace From: asomers@gmail.com To: Mark Johnston Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo , Alan Somers 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:37:08 -0000 Great timing. I think that's only a few hours more recent than my latest src checkout. On Wed, Jul 3, 2013 at 11:35 AM, Mark Johnston wrote: > 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]); >> }