Skip to content

Hold lock when updating DefaultMounts#1367

Merged
anmaxvl merged 1 commit intomicrosoft:masterfrom
anmaxvl:fix/extend-default-mounts-hold-lock
Apr 26, 2022
Merged

Hold lock when updating DefaultMounts#1367
anmaxvl merged 1 commit intomicrosoft:masterfrom
anmaxvl:fix/extend-default-mounts-hold-lock

Conversation

@anmaxvl
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

3 participants