Page MenuHomeFreeBSD

bridge: Call member interface ioctl() without NET_EPOCH
ClosedPublic

Authored by kp on Sep 12 2020, 10:06 PM.
Tags
None
Referenced Files
F137004041: D26418.id77815.diff
Thu, Nov 20, 11:25 PM
F137003348: D26418.id76959.diff
Thu, Nov 20, 11:23 PM
F137003269: D26418.id77954.diff
Thu, Nov 20, 11:23 PM
F137003140: D26418.id.diff
Thu, Nov 20, 11:22 PM
F137001988: D26418.diff
Thu, Nov 20, 11:18 PM
Unknown Object (File)
Tue, Nov 11, 3:59 AM
Unknown Object (File)
Sun, Nov 9, 1:28 AM
Unknown Object (File)
Sat, Nov 8, 1:08 PM

Details

Summary

We're not allowed to hold NET_EPOCH while sleeping, so when we call
ioctl() handlers for member interfaces we cannot be in NET_EPOCH.
We still need some protection of our CK_LISTs, so hold BRIDGE_LOCK
instead.
That requires changing BRIDGE_LOCK into a sleepable lock, and separating
the BRIDGE_RT_LOCK, to protect bridge_rtnode lists. That lock is taken
in the data path (while in NET_EPOCH), so it cannot be a sleepable lock.

While here document the locking stategy.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 33532
Build 30792: arc lint + arc unit

Event Timeline

kp requested review of this revision.Sep 12 2020, 10:06 PM

bridge: Call member interface ioctl() without NET_EPOCH

We're not allowed to hold NET_EPOCH while sleeping, so when we call
ioctl() handlers for member interfaces we cannot be in NET_EPOCH.
We still need some protection of our CK_LISTs, so hold BRIDGE_LOCK
instead.
That requires changing BRIDGE_LOCK into a sleepable lock, and separating
the BRIDGE_RT_LOCK, to protect bridge_rtnode lists. That lock is taken
in the data path (while in NET_EPOCH), so it cannot be a sleepable lock.

While here document the locking stategy.

kp retitled this revision from bridge: Do not enter NET_EPOCH in bridge_ioctl() to bridge: Call member interface ioctl() without NET_EPOCH.Oct 3 2020, 3:42 PM
kp edited the summary of this revision. (Show Details)
This revision was not accepted when it landed; it landed in state Needs Review.Oct 6 2020, 7:20 PM
This revision was automatically updated to reflect the committed changes.