Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jul 2013 13:35:16 -0400
From:      Mark Johnston <markj@freebsd.org>
To:        Alan Somers <asomers@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, Mark Johnston <markj@freebsd.org>, Rui Paulo <rpaulo@freebsd.org>, src-committers@freebsd.org
Subject:   Re: svn commit: r250953 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace
Message-ID:  <CAMw1wOzqo8%2Bw3_t_LvLqVTFgu%2B=5UVwwWrbVh0_i4Tiy9BUnRg@mail.gmail.com>
In-Reply-To: <CAOtMX2i2iUoyC92_Xn6jQbrm05=H8AJAvMpgsXGVQOGqhXH4RA@mail.gmail.com>
References:  <201305240329.r4O3TWnU016249@svn.freebsd.org> <CAOtMX2i2iUoyC92_Xn6jQbrm05=H8AJAvMpgsXGVQOGqhXH4RA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jul 3, 2013 at 1:28 PM, Alan Somers <asomers@freebsd.org> 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]);
>         }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMw1wOzqo8%2Bw3_t_LvLqVTFgu%2B=5UVwwWrbVh0_i4Tiy9BUnRg>