Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153373543
D9828.id25772.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
819 B
Referenced Files
None
Subscribers
None
D9828.id25772.diff
View Options
Index: sys/dev/vt/vt_core.c
===================================================================
--- sys/dev/vt/vt_core.c
+++ sys/dev/vt/vt_core.c
@@ -2617,10 +2617,17 @@
/* Init 25 Hz timer. */
callout_init_mtx(&vd->vd_timer, &vd->vd_lock, 0);
- /* Start timer when everything ready. */
+ /*
+ * Start timer when everything ready.
+ * Note that the operations here are purposefully ordered.
+ * We need to ensure vd_timer_armed is non-zero before we set
+ * the VDF_ASYNC flag. That prevents this function from
+ * racing with vt_resume_flush_timer() to update the
+ * callout structure.
+ */
+ atomic_add_acq_int(&vd->vd_timer_armed, 1);
vd->vd_flags |= VDF_ASYNC;
callout_reset(&vd->vd_timer, hz / VT_TIMERFREQ, vt_timer, vd);
- vd->vd_timer_armed = 1;
register_handlers = 1;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 21, 7:07 PM (2 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31927583
Default Alt Text
D9828.id25772.diff (819 B)
Attached To
Mode
D9828: Fix a panic during boot while executing the vt_timer() callout
Attached
Detach File
Event Timeline
Log In to Comment