HomeFreeBSD

lacp: Remove racy kassert

Description

lacp: Remove racy kassert

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.

Sponsored by: Netflix
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D35396

Details

Provenance
gallatinAuthored on Jun 13 2022, 3:32 PM
Reviewer
hselasky
Differential Revision
D35396: lacp: Remove racy kassert
Parents
rG66a0bc2105e4: ibcore: Fix use-after-free access in ucma_close()
Branches
Unknown
Tags
Unknown