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

Fix a lock inversion #213

Merged
merged 1 commit into from
Sep 12, 2018
Merged

Fix a lock inversion #213

merged 1 commit into from
Sep 12, 2018

Conversation

nalind
Copy link
Member

@nalind nalind commented Sep 12, 2018

In CreateContainer(), don't use ROLayerStores() to get a list of the read-only layer stores after we've acquired the lock on the writeable layer store. ROLayerStores() acquires the graph lock, which we should never try to acquire while we're holding the layer store lock.

In CreateContainer(), don't use ROLayerStores() to get a list of the
read-only layer stores after we've acquired the lock on the writeable
layer store.  ROLayerStores() acquires the graph lock, which we should
never try to acquire while we're holding the layer store lock.

Signed-off-by: Nalin Dahyabhai <[email protected]>
@nalind
Copy link
Member Author

nalind commented Sep 12, 2018

@mheon PTAL

@mheon
Copy link
Member

mheon commented Sep 12, 2018

Change LGTM, though I don't have a consistent reproducer for the lock issue in question in my environment.

Thanks for the quick work @nalind

@nalind
Copy link
Member Author

nalind commented Sep 12, 2018

This attempts to fix containers/podman#1146.

@TomSweeneyRedHat
Copy link
Member

LGTM
That's a subtle little bugger.

@rhatdan
Copy link
Member

rhatdan commented Sep 12, 2018

LGTM

@rhatdan rhatdan merged commit 243c4cd into containers:master Sep 12, 2018
@runcom runcom mentioned this pull request Nov 9, 2018
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