gvisor/pkg/p9
Michael Pratt 80cc2c78e5 Forward named pipe creation to the gofer
The backing 9p server must allow named pipe creation, which the runsc
fsgofer currently does not.

There are small changes to the overlay here. GetFile may block when
opening a named pipe, which can cause a deadlock:

1. open(O_RDONLY) -> copyMu.Lock() -> GetFile()
2. open(O_WRONLY) -> copyMu.Lock() -> Deadlock

A named pipe usable for writing must already be on the upper filesystem,
but we are still taking copyMu for write when checking for upper. That
can be changed to a read lock to fix the common case.

However, a named pipe on the lower filesystem would still deadlock in
open(O_WRONLY) when it tries to actually perform copy up (which would
simply return EINVAL). Move the copy up type check before taking copyMu
for write to avoid this.

p9 must be modified, as it was incorrectly removing the file mode when
sending messages on the wire.

PiperOrigin-RevId: 249154033
Change-Id: Id6637130e567b03758130eb6c7cdbc976384b7d6
2019-05-20 16:53:08 -07:00
..
local_server Forward named pipe creation to the gofer 2019-05-20 16:53:08 -07:00
p9test Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
BUILD Implement fallocate(2) 2019-05-09 15:35:49 -07:00
buffer.go Reduce memory allocations on serving path 2019-04-29 15:33:47 -07:00
buffer_test.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
client.go Reduce memory allocations on serving path 2019-04-29 15:33:47 -07:00
client_file.go Forward named pipe creation to the gofer 2019-05-20 16:53:08 -07:00
client_test.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
file.go Forward named pipe creation to the gofer 2019-05-20 16:53:08 -07:00
handlers.go Forward named pipe creation to the gofer 2019-05-20 16:53:08 -07:00
messages.go Forward named pipe creation to the gofer 2019-05-20 16:53:08 -07:00
messages_test.go Forward named pipe creation to the gofer 2019-05-20 16:53:08 -07:00
p9.go Implement fallocate(2) 2019-05-09 15:35:49 -07:00
p9_test.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
path_tree.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
pool.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
pool_test.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
server.go Reduce memory allocations on serving path 2019-04-29 15:33:47 -07:00
transport.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
transport_test.go Reduce memory allocations on serving path 2019-04-29 15:33:47 -07:00
version.go Implement fallocate(2) 2019-05-09 15:35:49 -07:00
version_test.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00