NFS: populate ->net in mount data when remounting
Subsystems (3)
PATCH 1/1 NFS: populate ->net in mount data when remounting
Otherwise the kernel oopses when remounting with IPv6 server because net is dereferenced in dev_get_by_name.
Use net ns of current thread so that dev_get_by_name does not operate on foreign ns. Changing the address is prohibited anyway so this should not affect anything.
Signed-off-by Mateusz Guzik <[email protected]>
Cc [email protected] # 3.4+
--- fs/nfs/super.c | 1 + 1 file changed, 1 insertion(+)
fs/nfs/super.c +1 -0
@@ -2248,6 +2248,7 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data) data->nfs_server.addrlen = nfss->nfs_client->cl_addrlen; data->version = nfsvers; data->minorversion = nfss->nfs_client->cl_minorversion; + data->net = current->nsproxy->net_ns;memcpy (&data->nfs_server.address, &nfss->nfs_client->cl_addr, data->nfs_server.addrlen);
Signature · 1 line
1.8.3.1