lkml.org 
[lkml]   [2018]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 31/32] [RFC] fs: Add a move_mount() system call [ver #8]
On Fri, May 25, 2018 at 01:08:44AM +0100, David Howells wrote:
> [!] NOTE: This patch doesn't quite work to move an O_CLONE_MOUNT-produced
> vfsmount as move_mount() checks that the source vfsmount mnt_ns matches
> the calling process's mnt_ns - but the vfsmount's mnt_ns isn't set
> until one attempts to actually mount it into the namespace.

*shrug*

Turn those checks into
error = -EINVAL;
/* mountpoint should be ours */
if (!check_mnt(p))
goto out1;
/* and the thing moved should be either ours or completely unattached */
if (old->mnt_ns && !check_mnt(old))
goto out1;

\
 
 \ /
  Last update: 2018-05-31 23:21    [W:0.198 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site