Add nil-check for parent mount in umount(2) while handling mount propagation.

PiperOrigin-RevId: 487585583
This commit is contained in:
Ayush Ranjan
2022-11-10 11:01:48 -08:00
committed by gVisor bot
parent 93b37dad70
commit ae136df849
+1 -1
View File
@@ -654,7 +654,7 @@ func (vfs *VirtualFilesystem) UmountAt(ctx context.Context, creds *auth.Credenti
umountTree := []*Mount{vd.mount}
parent, mountpoint := vd.mount.parent(), vd.mount.point()
if parent.propType == Shared {
if parent != nil && parent.propType == Shared {
for peer := parent.sharedList.Front(); peer != nil; peer = peer.sharedEntry.Next() {
if peer == parent {
continue