Page MenuHomeFreeBSD

Attempt to address lagg race in PR234864
AbandonedPublic

Authored by shurd on Jan 16 2019, 10:34 PM.
Tags
None
Referenced Files
F82070527: D18861.id52901.diff
Thu, Apr 25, 5:51 AM
F82041842: D18861.id52901.diff
Wed, Apr 24, 10:06 PM
F82034085: D18861.id52902.diff
Wed, Apr 24, 8:09 PM
Unknown Object (File)
Tue, Apr 23, 7:05 PM
Unknown Object (File)
Wed, Apr 17, 4:05 PM
Unknown Object (File)
Fri, Mar 29, 7:24 AM
Unknown Object (File)
Feb 4 2024, 4:17 AM
Unknown Object (File)
Dec 23 2023, 5:16 AM
Subscribers

Details

Reviewers
mmacy
Summary

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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 21988
Build 21222: 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.