Commit aadbec3a authored by Seth Forshee's avatar Seth Forshee Committed by Tim Gardner
Browse files

UBUNTU: SAUCE: kernfs: Do not match superblock in another user namespace when mounting

BugLink: http://bugs.launchpad.net/bugs/1570906



Two kernfs-based filesystems are currently mountable from
non-init user namespaces, sysfs and cgroupfs. Both of these have
use cases which end up attempting to mount the same superblock
from different user namespaces, but sget() no longer allows this
so these mount attempts will fail.

Update kernfs_test_super() to return false whenever s_user_ns is
not the current user namespace, resulting in a new super block
being allocated for these mounts. kernfs, sysfs, and cgroupfs are
all equipped to handle this situation.

Tested-by: default avatarTycho Andersen <tycho.andersen@canonical.com>
Acked-by: default avatarLeann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 82673736
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment