gvisor/pkg/p9
Michael Pratt b28dc25aea Remove p9.fidRef.openedMu
openedMu has lock ordering violations. Most locks go through OpenedFlag(),
which is usually taken after renameMu and opMu. On the other hand, Tlopen takes
openedMu before renameMu and opMu (via safelyRead).

Resolving this violation is simple: just drop openedMu. The opened and
openFlags fields are already protected by opMu in most cases, renameMu (for
write) in one case (via safelyGlobal), and only in doWalk by neither.

This is a bit ugly because opMu is supposed to be a "semantic" lock, but it
works. I'm open to other suggestions.

Note that doWalk has a race condition where a FID may open after the open check
but before actually walking. This race existed before this change as well; it
is not clear if it is problematic.

PiperOrigin-RevId: 346108483
2020-12-07 09:23:17 -08:00
..
p9test Implement setattr+clunk in 9P 2020-09-01 19:22:12 -07:00
BUILD Move p9.pool to a separate package 2020-02-06 10:07:45 -08:00
buffer.go Un-export p9 message encode/decode functions. 2020-02-14 12:23:10 -08:00
buffer_test.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
client.go Add support for TTY in multi-container 2020-11-17 14:51:24 -08:00
client_file.go Allow short writes from gofers. 2020-11-17 15:39:48 -08:00
client_test.go Eliminate one allocation per send/recv for non-flipcall transport. 2020-08-11 16:43:23 -07:00
file.go Implement setattr+clunk in 9P 2020-09-01 19:22:12 -07:00
handlers.go Remove p9.fidRef.openedMu 2020-12-07 09:23:17 -08:00
messages.go Implement setattr+clunk in 9P 2020-09-01 19:22:12 -07:00
messages_test.go Implement setattr+clunk in 9P 2020-09-01 19:22:12 -07:00
p9.go Implement setattr+clunk in 9P 2020-09-01 19:22:12 -07:00
p9_test.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
path_tree.go New sync package. 2020-01-09 22:02:24 -08:00
server.go Remove p9.fidRef.openedMu 2020-12-07 09:23:17 -08:00
transport.go Eliminate one allocation per send/recv for non-flipcall transport. 2020-08-11 16:43:23 -07:00
transport_flipcall.go Return EIO from p9 if sending/receiving fails. 2020-04-10 11:36:57 -07:00
transport_test.go Eliminate one allocation per send/recv for non-flipcall transport. 2020-08-11 16:43:23 -07:00
version.go Implement setattr+clunk in 9P 2020-09-01 19:22:12 -07:00
version_test.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00