HomeFreeBSD

opensolaris/uts/common/dtrace/fasttrap.c
rS258311Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

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().

Reviewed by: markj
Approved by: ken (mentor)
Sponsored by: Spectra Logic
MFC after: 4 weeks

Details

Provenance
asomersAuthored on
Parents
rS258310: Add the 'dvd1.iso' target. This mimics the 'release.iso' target,
Branches
Unknown
Tags
Unknown

Event Timeline