Page MenuHomeFreeBSD

xen/intr: protect xen_intr_port_to_isrc[] during resume
Needs ReviewPublic

Authored by ehem_freebsd_m5p.com on Jun 11 2021, 2:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 31, 3:35 AM
Unknown Object (File)
Sat, Oct 19, 9:12 AM
Unknown Object (File)
Sep 30 2024, 11:27 PM
Unknown Object (File)
Sep 30 2024, 1:14 AM
Unknown Object (File)
Sep 27 2024, 1:27 AM
Unknown Object (File)
Sep 27 2024, 1:23 AM
Unknown Object (File)
Sep 26 2024, 11:21 PM
Unknown Object (File)
Sep 26 2024, 10:04 PM
Subscribers

Details

Summary

The xen_intr_isrc_lock needs to be held while modifying the
xen_intr_port_to_isrc[] array. The lock was missing from
xen_intr_resume().

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 40355
Build 37244: arc lint + arc unit

Event Timeline

Thanks! For the record: the lock is not currently needed given the only caller has APs and interrupts disabled. I'm fine with adding this safeguard, but it should be noted in the commit message IMO that this is not currently an issue.

Also the comment about what what the lock protects should be better added where the lock is defined, as we don't want to be adding such comment at each place where the lock is used.

True enough, I'll add that to the commit message.

D30726 in fact adds such a comment, though I've thought of some text I might add to the comment.

Adding to commit message about not actually being required.

Adding some mtx_assert()s while here. These extra portions do implicitly depend on the lock being held.