gvisor/pkg/sentry/fs/host
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
control.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
descriptor.go Move fdnotifier package to reduce internal confusion. 2018-12-14 18:05:01 -08:00
descriptor_state.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
descriptor_test.go Move fdnotifier package to reduce internal confusion. 2018-12-14 18:05:01 -08:00
device.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
file.go Remove fs.Handle, ramfs.Entry, and all the DeprecatedFileOperations. 2019-01-14 20:34:28 -08:00
fs.go Allow filesystem.Mount to take an optional interface argument. 2019-03-13 19:24:03 -07:00
fs_test.go Allow filesystem.Mount to take an optional interface argument. 2019-03-13 19:24:03 -07:00
inode.go Remove references to replaced child in Rename in ramfs/agentfs 2019-03-18 18:40:06 -07:00
inode_state.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
inode_test.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
ioctl_unsafe.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
socket.go Move fdnotifier package to reduce internal confusion. 2018-12-14 18:05:01 -08:00
socket_iovec.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
socket_state.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
socket_test.go Move fdnotifier package to reduce internal confusion. 2018-12-14 18:05:01 -08:00
socket_unsafe.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
tty.go Don't allow writing or reading to TTY unless process group is in foreground. 2019-02-14 15:47:31 -08:00
util.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
util_unsafe.go No need to check for negative uintptr. 2019-03-06 15:06:46 -08:00
wait_test.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00