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
F106367501: D30725.diff
Sun, Dec 29, 11:43 AM
Unknown Object (File)
Nov 24 2024, 9:52 PM
Unknown Object (File)
Oct 31 2024, 3:35 AM
Unknown Object (File)
Oct 19 2024, 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
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 39862
Build 36751: 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.