Page MenuHomeFreeBSD

bhyve: Move the gdb_active check to gdb_cpu_suspend().
ClosedPublic

Authored by jhb on Apr 1 2021, 4:47 PM.
Tags
None
Referenced Files
F175907092: D29538.id87337.diff
Wed, Oct 14, 9:31 AM
F175906184: D29538.id86698.diff
Wed, Oct 14, 9:22 AM
F175905541: D29538.diff
Wed, Oct 14, 9:16 AM
Unknown Object (File)
Sat, Oct 10, 12:17 PM
Unknown Object (File)
Sat, Oct 10, 12:12 PM
Unknown Object (File)
Wed, Oct 7, 11:47 PM
Unknown Object (File)
Wed, Oct 7, 3:32 AM
Unknown Object (File)
Tue, Oct 6, 4:11 PM

Details

Summary

The check needs to be in the public routine (gdb_cpu_suspend()), not
in the internal routine called from various places
(_gdb_cpu_suspend()). All the other callers of _gdb_cpu_suspend()
already check gdb_active, and this breaks the use of snapshots when
the debug server is not enabled since gdb_cpu_suspend() tries to lock
an uninitialized mutex.

Reported by: Darius Mihai, Elena Mihailescu
Fixes: 621b5090487de9fed1b503769702a9a2a27cc7bb

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Apr 1 2021, 4:47 PM

We tested the patch and everything seems OK from our part. The fix works as intended. Thanks!

This revision is now accepted and ready to land.Apr 4 2021, 8:53 AM