Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F141042103
D39223.id119385.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
880 B
Referenced Files
None
Subscribers
None
D39223.id119385.diff
View Options
diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c
--- a/sys/netpfil/pf/if_pfsync.c
+++ b/sys/netpfil/pf/if_pfsync.c
@@ -402,7 +402,7 @@
{
struct pfsync_softc *sc = ifp->if_softc;
struct pfsync_bucket *b;
- int c;
+ int c, ret;
for (c = 0; c < pfsync_buckets; c++) {
b = &sc->sc_buckets[c];
@@ -415,17 +415,19 @@
struct pfsync_deferral *pd =
TAILQ_FIRST(&b->b_deferrals);
+ PFSYNC_BUCKET_LOCK(b);
TAILQ_REMOVE(&b->b_deferrals, pd, pd_entry);
b->b_deferred--;
- if (callout_stop(&pd->pd_tmo) > 0) {
+ ret = callout_stop(&pd->pd_tmo);
+ PFSYNC_BUCKET_UNLOCK(b);
+ if (ret > 0) {
pf_release_state(pd->pd_st);
m_freem(pd->pd_m);
- free(pd, M_PFSYNC);
} else {
pd->pd_refs++;
callout_drain(&pd->pd_tmo);
- free(pd, M_PFSYNC);
}
+ free(pd, M_PFSYNC);
}
callout_drain(&b->b_tmo);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 1, 2:48 AM (10 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27428158
Default Alt Text
D39223.id119385.diff (880 B)
Attached To
Mode
D39223: pfsync: hold b_mtx for callout_stop(pd_tmo)
Attached
Detach File
Event Timeline
Log In to Comment