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)
Sat, Dec 21, 3:53 PM
Unknown Object (File)
Wed, Dec 18, 6:44 PM
Unknown Object (File)
Thu, Dec 12, 6:42 PM
Unknown Object (File)
Sat, Nov 30, 1:46 PM
Unknown Object (File)
Nov 15 2024, 11:16 AM
Unknown Object (File)
Nov 15 2024, 11:12 AM
Unknown Object (File)
Oct 26 2024, 1:17 AM
Unknown Object (File)
Oct 16 2024, 12:59 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.