Skip to content

Commit

Permalink
dummynet: remove locks causing panics during callout
Browse files Browse the repository at this point in the history
pie_callout_cleanup() and fqpie_callout_cleanup() both panic
while grabbing these locks that have been added here previously
out of caution but we don't even access V_dn_cfg where the lock
is located at.  Refcounts inside these modules are static.
  • Loading branch information
fichtner committed Dec 14, 2021
1 parent b1f7340 commit 85b720c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 1 addition & 2 deletions sys/netpfil/ipfw/dn_aqm_pie.c
Expand Up @@ -628,9 +628,8 @@ pie_callout_cleanup(void *x)
mtx_unlock(&pst->lock_mtx);
mtx_destroy(&pst->lock_mtx);
free(x, M_DUMMYNET);
DN_BH_WLOCK();

pie_desc.ref_count--;
DN_BH_WUNLOCK();
}

/*
Expand Down
2 changes: 0 additions & 2 deletions sys/netpfil/ipfw/dn_sched_fq_pie.c
Expand Up @@ -580,7 +580,6 @@ fqpie_callout_cleanup(void *x)
mtx_destroy(&pst->lock_mtx);
psi_extra = q->psi_extra;

DN_BH_WLOCK();
psi_extra->nr_active_q--;

/* when all sub-queues are destroyed, free flows fq_pie extra vars memory */
Expand All @@ -589,7 +588,6 @@ fqpie_callout_cleanup(void *x)
free(psi_extra, M_DUMMYNET);
fq_pie_desc.ref_count--;
}
DN_BH_WUNLOCK();
}

/*
Expand Down

0 comments on commit 85b720c

Please sign in to comment.