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

Fixed potential race condition in cachedKeyService #1198

Merged
merged 1 commit into from
Jul 20, 2017

Conversation

rhonnava
Copy link
Contributor

Changed lock to be of type sync.RWMutex in cachedKeyService in notary/signer/keydbstore/cachedcryptoservice.go and introduced a read lock around read access to the map cachedKeys to avoid race conditions when the map is being read and written at the same time.

This fixes the issue #1194.

@docker-jenkins
Copy link

Can one of the admins verify this patch?

@riyazdf
Copy link
Contributor

riyazdf commented Jul 20, 2017

jenkins, test this please.

Copy link
Contributor

@riyazdf riyazdf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM on green

@cyli
Copy link
Contributor

cyli commented Jul 20, 2017

LGTM, thanks for fixing this @rhonnava!

@cyli cyli merged commit 73ff9f3 into notaryproject:master Jul 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants