Page MenuHomeFreeBSD

Attempt to address lagg race in PR234864

Authored by shurd on Jan 16 2019, 10:34 PM.
Referenced Files
Unknown Object (File)
Sat, May 20, 2:23 AM
Unknown Object (File)
Apr 10 2023, 1:51 AM
Unknown Object (File)
Feb 4 2023, 8:04 PM
Unknown Object (File)
Jan 9 2023, 7:50 PM
Unknown Object (File)
Jan 9 2023, 9:41 AM
Unknown Object (File)
Dec 19 2022, 9:01 AM
Unknown Object (File)
Dec 11 2022, 9:26 PM



A naive look at the if_lagg.c race suggests that extending
the RLOCK coverage over the entire transaction may resolve the problem.

Test Plan

Patch added to PR234846 for testing

Diff Detail

rS FreeBSD src repository - subversion
Lint Passed
No Test Coverage
Build Status
Buildable 21989
Build 21223: arc lint + arc unit

Event Timeline

RLOCK() before setting ifp->if_type

Can you explain your goal? Not sure what you are trying to solve with this rlock. Please, note that LAGG_RLOCK() is epoch_enter() and it seem used to make safe lagg_port reclamation using epoch_call().

So the basic goal is to have the test at sys/net/if_ethersubr.c:583 see a consistent state of the changes from the /* Change the interface type */ line to the lagg_proto_addport() line.

The naive thinking that led to this was "Oh, there's something with LOCK in it inside that block, maybe if I just expand the coverage of that, everything will be fine."

I'm taking a real look at the problem now.