Page MenuHomeFreeBSD

xen/intr: allow xen_intr_release_isrc() to reuse lock
AbandonedPublic

Authored by ehem_freebsd_m5p.com on Nov 7 2021, 4:25 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 5:38 AM
Unknown Object (File)
Dec 10 2023, 9:36 PM
Unknown Object (File)
Dec 3 2023, 3:20 PM
Unknown Object (File)
Sep 6 2023, 7:19 AM
Unknown Object (File)
Aug 28 2023, 5:52 PM
Unknown Object (File)
Aug 15 2023, 9:15 PM
Unknown Object (File)
Aug 14 2023, 7:18 AM
Unknown Object (File)
Jul 7 2023, 9:36 AM
Subscribers

Details

Reviewers
royger
mhorne
Summary

Calling mtx_unlock() only to immediately call mtx_lock() isn't so great.
Since xen_intr_unbind() already has the main lock held before calling
xen_intr_release_isrc(), avoid the back to back unlock then lock.

Diff Detail

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

Event Timeline

Kind of a "Hey, look what D32876 allows us to do!"

Yes, this got into Phabricator before final testing. Indeed, it is broken. The fix is pretty obvious.

Upon examination I suspect things may head in a different direction.

This isn't even the slightest bit of a priority. Worse, this does indeed make locking harrier.