[Bug 1093665] New: psmisc: Incorrect mountinfo parser
http://bugzilla.opensuse.org/show_bug.cgi?id=1093665 Bug ID: 1093665 Summary: psmisc: Incorrect mountinfo parser Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.0 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: martin.koegler@brz.gv.at QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- You just need to run "mount --make-private <mount point>". "fuser -m <mount-point>" will fail. mountinfo file format according to the kernel documentation: ========================= This file contains lines of the form: 36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue (1)(2)(3) (4) (5) (6) (7) (8) (9) (10) (11) (1) mount ID: unique identifier of the mount (may be reused after umount) (2) parent ID: ID of parent (or of self for the top of the mount tree) (3) major:minor: value of st_dev for files on filesystem (4) root: root of the mount within the filesystem (5) mount point: mount point relative to the process's root (6) mount options: per mount options (7) optional fields: zero or more fields of the form "tag[:value]" (8) separator: marks the end of the optional fields (9) filesystem type: name of filesystem of the form "type[.subtype]" (10) mount source: filesystem specific information or "none" (11) super options: per super block options ========================= In fuser.c init_mntinfo, the parsing breaks, if there is not exactly one field ( (7 - option fields) : while (fscanf (mnt, "%i %i %u:%u %*s %s %*s %*s - %s %*[^\n]", &mid, &parid, &maj, &min, &mpoint[0], &type[0]) == 6) The kernel formating code is (proc_namespace.c): /* Tagged fields ("foo:X" or "bar") */ if (IS_MNT_SHARED(r)) seq_printf(m, " shared:%i", r->mnt_group_id); if (IS_MNT_SLAVE(r)) { int master = r->mnt_master->mnt_group_id; int dom = get_dominating_id(r, &p->root); seq_printf(m, " master:%i", master); if (dom && dom != master) seq_printf(m, " propagate_from:%i", dom); } if (IS_MNT_UNBINDABLE(r)) seq_puts(m, " unbindable"); This not working parser code is added by 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch from werner@suse.de. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1093665
Martin Kögler
participants (1)
-
bugzilla_noreply@novell.com