bridge_linkstate() calls bstp_linkstate() inside the network epoch, but the SIOCGIFMEDIA ioctl can acquire sleepable driver locks and wait for hardware. Reuse the port's media task on taskqueue_thread for link events and existing media polling. Query in the interface's VNET without an epoch or BSTP mutex, then recheck port activity and update STP under the mutex and an epoch, since the state update can transmit BPDUs. Run the subsequent STP state update for every media refresh, including polling and reinitialization. This preserves query before update ordering for link events and lets other refreshes process pending transitions without waiting for the next STP tick. It does not add media queries or increase the existing polling frequency. Serialize link and packet input admission with port disable so late callbacks cannot enqueue work after teardown drains it. Initialize STP before publishing the bridge member. Drain media work before the notifications it can generate, and keep the member's bridge pointer valid until all of those callbacks finish. Wait for old epoch readers before destroying the BSTP mutex, and protect the final root-port cleanup with the mutex and an epoch. PR: 264549 Reported by: mfbott <bugaddress@posteo.net> MFC after: 2 weeks
Details
Details
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped