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
Unknown Object (File)
Feb 14 2024, 9:37 AM
Unknown Object (File)
Jan 14 2024, 10:43 AM
Unknown Object (File)
Dec 31 2023, 7:46 PM
Unknown Object (File)
Dec 31 2023, 6:19 PM
Unknown Object (File)
Dec 14 2023, 1:25 PM
Unknown Object (File)
Dec 11 2023, 12:42 AM
Unknown Object (File)
Dec 10 2023, 4:09 PM
Unknown Object (File)
Nov 7 2023, 12: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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 38257
Build 35146: arc lint + arc unit

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