HomeFreeBSD

lagg: wrap lagg_port2req() into LAGG_SLOCK()

Description

lagg: wrap lagg_port2req() into LAGG_SLOCK()

Although a port addition is coded in a sequence where first all softc
information is fulfilled and only then it is attached to the lagg, we
still need a locking primitive to guarantee cache invalidation. Panic
observed in the wild shows that lacp_portreq() called via
lagg_port_ioctl(SIOCGLAGGPORT) immediately after port creation may see
lp->lp_psc as NULL and panic. In the core file we will see valid data
all around. A race via lagg_ioctl() wasn't observed but potentially
is possible.

Differential Revision: https://reviews.freebsd.org/D43501

Details

Provenance
glebiusAuthored on Feb 24 2024, 1:56 AM
Differential Revision
D43501: lagg: wrap lagg_port2req() into LAGG_SLOCK()
Parents
rG4c6ceca9cc44: tests/fdgrowtable: perform the threaded test in a child process
Branches
Unknown
Tags
Unknown