When running with debug.mpsafenet=0, initialize IP multicast routing

callouts as non-CALLOUT_MPSAFE.  Otherwise, they may trigger an
assertion regarding Giant if they enter other parts of the stack from
the callout.

MFC after:	3 days
Reported by:	Dikshie < dikshie at ppk dot itb dot ac dot id >
This commit is contained in:
rwatson 2004-10-07 14:13:35 +00:00
parent 15ba1cfe47
commit ccb2845f23

View File

@ -598,20 +598,23 @@ get_vif_cnt(struct sioc_vif_req *req)
static void
ip_mrouter_reset(void)
{
int callout_flag;
bzero((caddr_t)mfctable, sizeof(mfctable));
bzero((caddr_t)nexpire, sizeof(nexpire));
pim_assert = 0;
mrt_api_config = 0;
callout_init(&expire_upcalls_ch, CALLOUT_MPSAFE);
callout_flag = debug_mpsafenet ? CALLOUT_MPSAFE : 0;
callout_init(&expire_upcalls_ch, callout_flag);
bw_upcalls_n = 0;
bzero((caddr_t)bw_meter_timers, sizeof(bw_meter_timers));
callout_init(&bw_upcalls_ch, CALLOUT_MPSAFE);
callout_init(&bw_meter_ch, CALLOUT_MPSAFE);
callout_init(&bw_upcalls_ch, callout_flag);
callout_init(&bw_meter_ch, callout_flag);
callout_init(&tbf_reprocess_ch, CALLOUT_MPSAFE);
callout_init(&tbf_reprocess_ch, callout_flag);
}
static struct mtx mrouter_mtx; /* used to synch init/done work */