Page MenuHomeFreeBSD

Fix lock order reversal in lagg_get_counter
AbandonedPublic

Authored by asomers on Oct 20 2016, 10:04 PM.
Tags
None
Referenced Files
F82166645: D8306.id.diff
Fri, Apr 26, 3:20 AM
F82160742: D8306.id21564.diff
Fri, Apr 26, 1:48 AM
F82160731: D8306.id.diff
Fri, Apr 26, 1:48 AM
F82126834: D8306.diff
Thu, Apr 25, 7:22 PM
Unknown Object (File)
Dec 20 2023, 2:12 AM
Unknown Object (File)
Dec 16 2023, 1:16 PM
Unknown Object (File)
Nov 19 2023, 5:14 PM
Unknown Object (File)
Nov 11 2023, 8:02 PM
Subscribers

Details

Reviewers
melifaro
glebius
Summary

r272211 introduced a LOR in lagg_get_counter by acquiring the lagg softc
lock after previously acquiring the if_addr lock in sysctl_iflist. My
solution is to opportunistically acquire the lagg softc. If it can't be
locked, then return an old copy of the counters. The user will see what
looks like a lull in traffic, but it will "catch up" the next time that
he checks.

Diff Detail

Event Timeline

asomers retitled this revision from to Fix lock order reversal in lagg_get_counter.
asomers updated this object.
asomers edited the test plan for this revision. (Show Details)
asomers added reviewers: glebius, melifaro.
asomers added a subscriber: ken.

This is not the correct fix. The bug lies in a higher layer; the stack must never call into the ifnet layer with the if_addr_lock already held. I see how to fix the upper layer, so I'll take that.

Obsolete. This bug was fixed in a better way by 308580 by @rstone.