Skip to content
Commit 7fa98a30 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov
Browse files

mount: handle a circular reference in mount tree



$ cat /proc/self/mountinfo
...
1 1 0:2 / / rw - rootfs rootfs rw,size=373396k,nr_inodes=93349
...

You can see that mnt_id and parent_mnt_id are equals here.
This patch interpretes this case as a root mount in a tree.

0'th mount is rootfs, which is mounted in init_mount_tree().

We don't see it in cases when system makes chroot, because of

static int show_mountinfo(struct seq_file *m, struct vfsmount *mnt)
	...
	/* mountpoints outside of chroot jail will give SEQ_SKIP on this */
	err = seq_path_root(m, &mnt_path, &root, " \t\n\\");

Cc: beproject criu <beprojectcriu@gmail.com>
Cc: Christopher Covington <cov@codeaurora.org>
Reported-by: default avatarbeproject criu <beprojectcriu@gmail.com>
Reviewed-by: default avatarChristopher Covington <cov@codeaurora.org>
Signed-off-by: default avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
parent 4eec4c6e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment