gvisor/pkg/sentry/fs/gofer
Michael Pratt 8a499ae65f Remove references to replaced child in Rename in ramfs/agentfs
In the case of a rename replacing an existing destination inode, ramfs
Rename failed to first remove the replaced inode. This caused:

1. A leak of a reference to the inode (making it live indefinitely).
2. For directories, a leak of the replaced directory's .. link to the
   parent. This would cause the parent's link count to incorrectly
   increase.

(2) is much simpler to test than (1), so that's what I've done.

agentfs has a similar bug with link count only, so the Dirent layer
informs the Inode if this is a replacing rename.

Fixes #133

PiperOrigin-RevId: 239105698
Change-Id: I4450af2462d8ae3339def812287213d2cbeebde0
2019-03-18 18:40:06 -07:00
..
BUILD Remove license comments 2019-01-31 11:12:53 -08:00
attr.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
cache_policy.go Make cacheRemoteRevalidating detect changes to file size 2019-01-25 17:23:07 -08:00
context_file.go Track paths and provide a rename hook. 2018-10-23 00:20:15 -07:00
device.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
file.go Internal change. 2019-02-21 13:08:34 -08:00
file_state.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
fs.go Allow filesystem.Mount to take an optional interface argument. 2019-03-13 19:24:03 -07:00
gofer_test.go Deflake gofer_test. 2018-12-20 17:23:26 -08:00
handles.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
inode.go Add fs.AsyncWithContext and call it in fs/gofer/inodeOperations.Release. 2019-02-08 15:54:15 -08:00
inode_state.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
path.go Remove references to replaced child in Rename in ramfs/agentfs 2019-03-18 18:40:06 -07:00
session.go Invalidate COW mappings when file is truncated 2019-01-31 12:54:00 -08:00
session_state.go Allow filesystem.Mount to take an optional interface argument. 2019-03-13 19:24:03 -07:00
socket.go Convert Unix transport to syserr 2018-10-24 11:05:08 -07:00
util.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00