Page MenuHomeFreeBSD

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

Authored by ehem_freebsd_m5p.com on Dec 23 2021, 6:24 AM.

Details

Reviewers
royger
mhorne
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 OK
Unit
No Unit Test Coverage
Build Status
Buildable 43553
Build 40441: arc lint + arc unit

Event Timeline

sys/xen/xen_intr.c
470–471

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

sys/xen/xen_intr.c
470–471

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

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