Add calls to callout_drain() to ensure the callouts are flushed before

we free memory from underneath them.

This fixes an occasional panic I've been seeing in softclock() where a bad
pointer would be encountered when pushing DTrace hard.
This commit is contained in:
John Birrell 2008-08-19 21:28:58 +00:00
parent 9e5fbab2a2
commit ac80559536

View File

@ -13616,7 +13616,9 @@ dtrace_state_destroy(dtrace_state_t *state)
cyclic_remove(state->dts_deadman);
#else
callout_stop(&state->dts_cleaner);
callout_drain(&state->dts_cleaner);
callout_stop(&state->dts_deadman);
callout_drain(&state->dts_deadman);
#endif
dtrace_dstate_fini(&vstate->dtvs_dynvars);