Page MenuHomeFreeBSD

Attempt to address lagg race in PR234864
AbandonedPublic

Authored by shurd on Jan 16 2019, 10:34 PM.

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
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 21989
Build 21223: arc lint + arc unit

Event Timeline

shurd created this revision.Jan 16 2019, 10:34 PM
shurd updated this revision to Diff 52902.Jan 16 2019, 10:36 PM

RLOCK() before setting ifp->if_type

ae added a comment.Jan 17 2019, 11:28 AM

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().

shurd added a comment.Jan 17 2019, 5:45 PM

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.

shurd abandoned this revision.Jan 18 2019, 5:42 PM