]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r258311
authorasomers <asomers@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 27 Mar 2014 19:04:15 +0000 (19:04 +0000)
committerasomers <asomers@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 27 Mar 2014 19:04:15 +0000 (19:04 +0000)
commitc7078f20bc3fd5966777144742a1a69be1157df7
treeb144dc9089eea480bf7db201e7d85de7bf812a9f
parentc466c0d1f9ff0fb413aca1f005347b65826cd5ef
MFC r258311

  opensolaris/uts/common/dtrace/fasttrap.c
          Fix several problems that can cause panics on kldload and kldunload.

          * kproc_create(fasttrap_pid_cleanup_cb, ...) gets called before
            fasttrap_provs.fth_table gets allocated.  This can lead to a panic
            on module load, because fasttrap_pid_cleanup_cb references
            fasttrap_provs.fth_table.  Move kproc_create down after the point
            that fasttrap_provs.fth_table gets allocated, and modify the error
            handling accordingly.

          * dtrace_fasttrap_{fork,exec,exit} weren't getting NULLed until
            after fasttrap_provs.fth_table got freed.  That caused panics on
            module unload because fasttrap_exec_exit calls
            fasttrap_provider_retire, which references
            fasttrap_provs.fth_table.  NULL those function pointers earlier.

          * There wasn't any code to destroy the
            fasttrap_{tpoints,provs,procs}.fth_table mutexes on module unload,
            leading to a resource leak when WITNESS is enabled.  Destroy those
            mutexes during fasttrap_unload().

Sponsored by: Spectra Logic Corporation

git-svn-id: svn://svn.freebsd.org/base/stable/9@263823 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/kern/uipc_sockbuf.c
sys/kern/uipc_usrreq.c
sys/sys/sockbuf.h