Page MenuHomeFreeBSD

lacp: Remove racy kassert
ClosedPublic

Authored by gallatin on Jun 3 2022, 5:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Feb 24, 8:54 PM
Unknown Object (File)
Mon, Feb 24, 5:42 PM
Unknown Object (File)
Mon, Feb 24, 5:30 PM
Unknown Object (File)
Mon, Feb 24, 9:40 AM
Unknown Object (File)
Feb 16 2025, 9:18 PM
Unknown Object (File)
Feb 10 2025, 8:51 AM
Unknown Object (File)
Feb 4 2025, 2:41 AM
Unknown Object (File)
Feb 4 2025, 12:10 AM

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