Page MenuHomeFreeBSD

xen/intr: add channel closing in case of early setup failure
AbandonedPublic

Authored by ehem_freebsd_m5p.com on Dec 23 2021, 6:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 3 2024, 2:42 AM
Unknown Object (File)
Jan 31 2024, 8:09 AM
Unknown Object (File)
Jan 21 2024, 5:02 AM
Unknown Object (File)
Jan 10 2024, 1:55 AM
Unknown Object (File)
Dec 24 2023, 9:14 PM
Unknown Object (File)
Dec 21 2023, 11:15 AM
Unknown Object (File)
Dec 15 2023, 9:55 PM
Unknown Object (File)
Dec 10 2023, 10:11 PM
Subscribers

Details

Reviewers
royger
Summary

xen_intr_bind_isrc() will now close event channels if the source is
marked in all cases. This means callers no longer need to handle
closing of channels if xen_intr_bind_isrc() fails.

Diff Detail

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

Event Timeline

sys/xen/xen_intr.c
470–471 ↗(On Diff #100488)

This is particularly ugly. A goto into a loop is not acceptable.

sys/xen/xen_intr.c
470–471 ↗(On Diff #100488)

I was trying to figure out how best to express this. Problem was having a goto failcomm; after failrelease: seemed kind of ugly too.

sys/xen/xen_intr.c
470–471 ↗(On Diff #100488)

Oh, the other option is doing a if(isrc) and hope the compiler optimizes the conditional out.

ehem_freebsd_m5p.com added a subscriber: mhorne.

Eventually when this had sufficient looking at only the two spots before the allocation need a special case. Once the allocation is done, xen_intr_release_isrc() adequately handles channel shutdown. As such this resolves @mhorne's comment.

Due to coming up with an alternative approach, this appears certain to disappear.