Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142685180
D26586.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
896 B
Referenced Files
None
Subscribers
None
D26586.id.diff
View Options
Index: sys/netgraph/ng_l2tp.c
===================================================================
--- sys/netgraph/ng_l2tp.c
+++ sys/netgraph/ng_l2tp.c
@@ -656,9 +656,9 @@
/* Reset sequence number state */
ng_l2tp_seq_reset(priv);
- /* Free private data if neither timer is running */
- ng_uncallout(&seq->rack_timer, node);
- ng_uncallout(&seq->xack_timer, node);
+ /* Wait for callouts to finish executing before freeing anything. */
+ callout_drain(&seq->rack_timer);
+ callout_drain(&seq->xack_timer);
mtx_destroy(&seq->mtx);
@@ -1274,6 +1274,8 @@
/* Sanity check */
L2TP_SEQ_CHECK(seq);
+ mtx_lock(&seq->mtx);
+
/* Stop timers */
ng_uncallout(&seq->rack_timer, priv->node);
ng_uncallout(&seq->xack_timer, priv->node);
@@ -1300,6 +1302,8 @@
seq->rexmits = 0;
bzero(seq->xwin, sizeof(seq->xwin));
+ mtx_unlock(&seq->mtx);
+
/* Done */
L2TP_SEQ_CHECK(seq);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 23, 5:45 AM (14 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27856722
Default Alt Text
D26586.id.diff (896 B)
Attached To
Mode
D26586: ng_l2tp: Fix synchronization with node shutdown or reset
Attached
Detach File
Event Timeline
Log In to Comment