Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node/manager: Lock nodes slice during Subscribe #9495

Merged
merged 1 commit into from Oct 25, 2019

Conversation

joestringer
Copy link
Member

@joestringer joestringer commented Oct 24, 2019

Previously we didn't lock the nodes list for reading during
Subscribe(), so this iteration would not protect against concurrent
access/update of the nodes list during subscription.

Fix it using a readlock of the manager's RWMutex.

Found by code inspection.


This change is Reviewable

Previously we didn't lock the nodes list for reading during
`Subscribe()`, so this iteration would not protect against concurrent
access/update of the nodes list during subscription.

Fix it using a readlock of the manager's RWMutex.

Signed-off-by: Joe Stringer <joe@cilium.io>
@joestringer
Copy link
Member Author

test-me-please

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.002%) to 45.305% when pulling 885c672 on joestringer:submit/fix-nodemanager-subscribe into 4d95cc8 on cilium:master.

@ianvernon ianvernon added this to Backport Pending in 1.6.4 Oct 24, 2019
@tgraf tgraf merged commit 74cc664 into cilium:master Oct 25, 2019
@joestringer joestringer deleted the submit/fix-nodemanager-subscribe branch October 25, 2019 17:57
@ianvernon ianvernon moved this from Backport Pending to Done in 1.6.4 Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
1.6.4
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants