diff options
| author | Kevin Bowling <kbowling@FreeBSD.org> | 2026-08-26 10:51:58 +0000 |
|---|---|---|
| committer | Kevin Bowling <kbowling@FreeBSD.org> | 2026-09-03 03:53:02 +0000 |
| commit | a0da653aaeae313479f2ab37d0faca483f530fa6 (patch) | |
| tree | 98ea32806fe9dc8e15232802899efb26253006dd /source/Target/ThreadPlanPython.cpp | |
| parent | 726f096f905c8e2ad2ac0035355fc2b4ed2718fe (diff) | |
tpm20: Initialize common state before testing TIS interrupts
The TIS attach path tested its interrupt by transmitting GetRandom
before tpm20_init() allocated the internal command buffer. A TPM2 FIFO
device with a usable IRQ could therefore dereference a null
internal_priv.
Initialize the common TPM2 state before running the interrupt test.
Make common cleanup safe for partially initialized devices and leave
cleanup to the attachment after tpm20_init() fails, avoiding duplicate
release of the lock, command buffer, and random-source state.
Clear the IRQ resource pointer after releasing it when interrupt handler
setup fails so the later polling-mode detach does not release it twice.
Free the internal command allocation through its object pointer rather
than relying on its embedded buffer being the first structure member.
Reviewed by: kevans
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59196
Diffstat (limited to 'source/Target/ThreadPlanPython.cpp')
0 files changed, 0 insertions, 0 deletions
