[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190701111950.GY17978@ZenIV.linux.org.uk>
Date: Mon, 1 Jul 2019 12:19:51 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: David Howells <dhowells@...hat.com>
Cc: Eric Biggers <ebiggers@...nel.org>, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com
Subject: Re: [PATCH] vfs: move_mount: reject moving kernel internal mounts
On Mon, Jul 01, 2019 at 08:38:10AM +0100, David Howells wrote:
> Al Viro <viro@...iv.linux.org.uk> wrote:
>
> > /* The thing moved must be mounted... */
> > if (!is_mounted(old_path->mnt))
> > goto out;
>
> Um... Doesn't that stuff up fsmount()?
Nope - check is_mounted() definition. Stuff in anon namespace
*is* mounted there, so that's not a problem.
FWIW, is_mounted() would've been better off spelled as
ns != NULL && ns != MNT_NS_INTERNAL; the use of IS_ERR_OR_NULL
in there works, but is unidiomatic and I don't think it yields
better code...
Powered by blists - more mailing lists