On Fri, Sep 05, 2025 at 10:32:15AM -0400, Dennis Dalessandro wrote:
Note there are cases when callers only held the s lock. In order to prevent further ABBA spinlocks we must not attempt to grab the r lock while someone else holds it. If someone holds it we must drop the s lock and grab r then s.
That's horrible, please don't do this.
If the caller holds a lock across a function then the function shouldn't randomly unlock it, it destroys any data consistency the caller may have had or relied on.
If the caller doesn't actually need the lock after calling this new callchain then have the function return with the lock unlocked. This is ugly too, but at least it does not expose the caller to a subtle bug class.
Also, this seems too big and complicated for -rc at this point :\
Jason