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)
Mar 2 2024, 2:21 PM
Unknown Object (File)
Feb 19 2024, 11:04 AM
Unknown Object (File)
Dec 30 2023, 10:02 AM
Unknown Object (File)
Dec 25 2023, 12:38 AM
Unknown Object (File)
Dec 20 2023, 4:56 AM
Unknown Object (File)
Dec 10 2023, 7:34 PM
Unknown Object (File)
Nov 24 2023, 12:19 AM
Unknown Object (File)
Nov 23 2023, 3:18 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.