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)
May 8 2023, 4:36 AM
Unknown Object (File)
Apr 5 2023, 7:43 PM
Unknown Object (File)
Mar 6 2023, 3:54 AM
Unknown Object (File)
Feb 22 2023, 7:37 AM
Unknown Object (File)
Feb 16 2023, 12:10 PM
Unknown Object (File)
Jan 8 2023, 3:33 PM
Unknown Object (File)
Jan 5 2023, 12:31 PM
Unknown Object (File)
Dec 14 2022, 6:09 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.