]> git.ipfire.org Git - thirdparty/man-pages.git/commit - man5/proc.5
proc.5: Rework the description of /proc/PID/mountinfo parent-ID field
authorMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 20 Nov 2017 08:59:43 +0000 (09:59 +0100)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 20 Nov 2017 09:37:33 +0000 (10:37 +0100)
commit2927055043ce0710d55357f448b4f80268a2fafe
treef6d751c14e7422fe3771d5c69cb64c0e84c335af
parent35cf1b93979b8e2107878126e580c517c08cbc29
proc.5: Rework the description of /proc/PID/mountinfo parent-ID field

After comments from Miklos, and further digging in the kernel
source that showed that chroot() can also result in "hidden"
parent-IDs in mountinfo, I've revised the description of
mountinfo.

In fs/proc_namespace.cs::how_mountinfo() there is:

        /* mountpoints outside of chroot jail will give SEQ_SKIP on this */
        err = seq_path_root(m, &mnt_path, &p->root, " \t\n\\");
        if (err)
                goto out;

I instrumented the 'if (err)' code path with printk()
to show that there is indeed a record corresponding to the
parent-ID for the process root that is being skipped.

Reported-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man5/proc.5