diff options
author | Mateusz Guzik <mguzik@redhat.com> | 2014-06-10 12:44:12 +0200 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-07-17 13:43:18 +0200 |
commit | 708fc7633ef80d411ab112d2ec64dd5826c9863a (patch) | |
tree | 73b400a995248b7aa7c8bec4d1eb7b91442c1d84 | |
parent | 9b8a9bf75003800ba4143b8b6c53bb41e57d00f9 (diff) |
NFS: populate ->net in mount data when remounting
commit a914722f333b3359d2f4f12919380a334176bb89 upstream.
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 <mguzik@redhat.com>
Cc: linux-nfs@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
-rw-r--r-- | fs/nfs/super.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index a03b9c6f948..64940b5286d 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -2197,6 +2197,7 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data) data->timeo = 10U * nfss->client->cl_timeout->to_initval / HZ; data->nfs_server.port = nfss->port; data->nfs_server.addrlen = nfss->nfs_client->cl_addrlen; + data->net = current->nsproxy->net_ns; memcpy(&data->nfs_server.address, &nfss->nfs_client->cl_addr, data->nfs_server.addrlen); |