diff options
author | asomers <asomers@FreeBSD.org> | 2013-12-16 19:59:34 +0000 |
---|---|---|
committer | asomers <asomers@FreeBSD.org> | 2013-12-16 19:59:34 +0000 |
commit | 34ade72d5f333ee47cbd09a453c1578f2e92fc66 (patch) | |
tree | 91a163c3552e24c0cecf3159976a883b6befb3e9 /release/scripts | |
parent | d72da1522ebaf9f726ebc64ad1bd4c7b3eef10ec (diff) | |
download | FreeBSD-src-34ade72d5f333ee47cbd09a453c1578f2e92fc66.zip FreeBSD-src-34ade72d5f333ee47cbd09a453c1578f2e92fc66.tar.gz |
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
Diffstat (limited to 'release/scripts')
0 files changed, 0 insertions, 0 deletions