Re: [PATCH 2/2] init: allow mounting arbitrary non-blockdevice filesystems as root

From: Christoph Hellwig
Date: Fri Jun 18 2021 - 09:20:47 EST


On Thu, Jun 17, 2021 at 12:26:10PM -0400, Vivek Goyal wrote:
> Not sure what FS_BINARY_MOUNTDATA is why fs should not have that set. nfs
> seems to set it too. So that means they can't use try_mount_nodev().

We can't really pass actual binary mountdata using the string separation
scheme used by the rootfstype= option. But given that NFS only uses
binary mountdata for legacy reasons and people get what they ask for
using the option I think we can drop the check.

> In case of success err == 0, but we still panic(). We will need to
> check for success as well.

Indeed.

> root_fs_names can be NULL and it crashes with NULL pointer dereference.

True.

What do you think of this version?

---