]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
With EARLY_AP_STARTUP enabled, we are seeing crashes in softclock_call_cc()
authorJonathan T. Looney <jtl@FreeBSD.org>
Thu, 8 Jun 2017 20:47:18 +0000 (20:47 +0000)
committerJonathan T. Looney <jtl@FreeBSD.org>
Thu, 8 Jun 2017 20:47:18 +0000 (20:47 +0000)
commitdd776f45931864d3dc83296ed205d25c77f3875e
tree7f7bf255522518d53df63c3e077ae5cfb7352185
parentdc6a41b936668b4022d98d986f4db7dec8e94b90
With EARLY_AP_STARTUP enabled, we are seeing crashes in softclock_call_cc()
during bootup. Debugging information shows that softclock_call_cc() is
trying to execute the vt_consdev.vd_timer callout, and the callout
structure contains a NULL c_func.

This appears to be due to a race between vt_upgrade() running
callout_reset() and vt_resume_flush_timer() calling callout_schedule().

Fix the race by ensuring that vd_timer_armed is always set before
attempting to (re)schedule the callout.

Discussed with: emaste
MFC after: 2 weeks
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D9828
sys/dev/vt/vt_core.c