svn commit: r250953 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace

Mark Johnston markj at freebsd.org
Wed Jul 3 17:35:18 UTC 2013


On Wed, Jul 3, 2013 at 1:28 PM, Alan Somers <asomers at 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]);
>         }


More information about the svn-src-all mailing list