vishvananda / netns

Simple network namespace handling for go.
Apache License 2.0
374 stars 133 forks source link

NewNamed(), DeleteNamed() - Missing a mutex #85

Open davidhadas opened 3 months ago

davidhadas commented 3 months ago

NewNamed(), DeleteNamed() missing support multithreaded environments.

A mutex need to be added to ensure that when a file is created it is also mounted without an attempt from a different threat to use, create or delete the same netns.

A mutex need to be added to ensure that when a file is unmounted it is also deleted without an attempt from a different threat to use, create or delete the same netns.

jeffwidman commented 1 month ago

A PR would be most welcome.