From ccb2845f238d279e9d789537a6359593811b4260 Mon Sep 17 00:00:00 2001 From: rwatson Date: Thu, 7 Oct 2004 14:13:35 +0000 Subject: 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 > --- sys/netinet/ip_mroute.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index ca2b562..0df4807 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -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 */ -- cgit v1.1