summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-10-07 14:13:35 +0000
committerrwatson <rwatson@FreeBSD.org>2004-10-07 14:13:35 +0000
commitccb2845f238d279e9d789537a6359593811b4260 (patch)
tree17f1bea176221f4a9166160ac933e14b1f10ecd2 /sys
parent15ba1cfe47a22834c8263baeef1569d92925d333 (diff)
downloadFreeBSD-src-ccb2845f238d279e9d789537a6359593811b4260.zip
FreeBSD-src-ccb2845f238d279e9d789537a6359593811b4260.tar.gz
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 >
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_mroute.c11
1 files changed, 7 insertions, 4 deletions
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 */
OpenPOWER on IntegriCloud