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

Hold lock when updating DefaultMounts #1367

Merged

Conversation

anmaxvl
Copy link
Contributor

@anmaxvl anmaxvl commented Apr 22, 2022

Signed-off-by: Maksim An maksiman@microsoft.com

@anmaxvl anmaxvl requested a review from a team as a code owner April 22, 2022 00:48
Signed-off-by: Maksim An <maksiman@microsoft.com>
@anmaxvl anmaxvl force-pushed the fix/extend-default-mounts-hold-lock branch from 537905b to 7fe8354 Compare April 22, 2022 00:48
@helsaawy
Copy link
Contributor

It feels weird to mutex-guard exported fields in an exported struct, since users can bypass the mutex and violate assumptions.
Do we want to rework it so that pe.DefaultMounts, .Containers, and co are private and use methods that return copies instead?

@anmaxvl
Copy link
Contributor Author

anmaxvl commented Apr 22, 2022

not a bad idea, but I'd prefer implementing it as a separate PR, if you don't mind.

@anmaxvl anmaxvl merged commit a3a8aa1 into microsoft:master Apr 26, 2022
@anmaxvl anmaxvl deleted the fix/extend-default-mounts-hold-lock branch April 26, 2022 21:16
anmaxvl added a commit that referenced this pull request Feb 7, 2023
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.

None yet

3 participants