kinst: test lock in kinst_trampoline_dealloc_locked()

Reviewed by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39883
This commit is contained in:
Christos Margiolis 2023-05-01 15:22:37 +00:00 committed by Mark Johnston
parent aad1685066
commit e11d11c543

View File

@ -163,6 +163,8 @@ kinst_trampoline_dealloc_locked(uint8_t *tramp, bool freechunks)
struct trampchunk *chunk;
int off;
sx_assert(&kinst_tramp_sx, SX_XLOCKED);
if (tramp == NULL)
return;