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

syscall: fs_nacl.go: Link and Rename missing fs mutex lock/unlock #22690

Closed
tenortim opened this issue Nov 13, 2017 · 2 comments
Closed

syscall: fs_nacl.go: Link and Rename missing fs mutex lock/unlock #22690

tenortim opened this issue Nov 13, 2017 · 2 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@tenortim
Copy link
Contributor

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.9.2 darwin/amd64

Does this issue reproduce with the latest release?

Issue uncovered by inspection.

What operating system and processor architecture are you using (go env)?

Go playground using GOOS=nacl

What did you do?

Per comments at the head of fs_nacl.go:

// Since there is no I/O (everything is in memory),
// the global lock mu protects the whole file system state,
// and that's okay.

and

// Except where indicated otherwise, unexported methods on fsys
// expect fs.mu to have been locked by the caller.

but Link and Rename call these methods without locking fs.

What did you expect to see?

fs calls should be serialized

What did you see instead?

These two are not.
Fix is trivial. I'm happy the needed changes

@bradfitz bradfitz added this to the Unplanned milestone Nov 13, 2017
@bradfitz bradfitz added the NeedsFix The path to resolution is known, but the work has not been done. label Nov 13, 2017
@bradfitz
Copy link
Contributor

Fine for Go 1.10, or whenever. Thanks.

@gopherbot
Copy link

Change https://golang.org/cl/79295 mentions this issue: syscall: add missing fs locking in Link, Rename

@golang golang locked and limited conversation to collaborators Nov 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants