Page MenuHomeFreeBSD

lacp: Remove racy kassert
ClosedPublic

Authored by gallatin on Jun 3 2022, 5:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jan 22, 1:50 PM
Unknown Object (File)
Sat, Jan 11, 5:45 AM
Unknown Object (File)
Dec 9 2024, 2:05 PM
Unknown Object (File)
Nov 25 2024, 3:38 PM
Unknown Object (File)
Oct 30 2024, 12:39 PM
Unknown Object (File)
Oct 27 2024, 6:53 PM
Unknown Object (File)
Oct 3 2024, 5:43 AM
Unknown Object (File)
Sep 22 2024, 10:46 PM

Details

Summary

In lacp_select_tx_port_by_hash(), we assert that the selected port is DISTRIBUTING. However, the port state is protected by the LACP_LOCK(), which is not held around lacp_select_tx_port_by_hash(). So this assertion is racy, and can result in a spurious panic when links are flapping.

It is certainly possible to fix it by acquiring LACP_LOCK(), but this seems like an early development assert, and it seems best to just remove it, rather than add complexity inside an ifdef INVARIANTS..

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable