From patchwork Mon Jul 21 21:21:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 372233 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id EEE95140143; Tue, 22 Jul 2014 07:23:24 +1000 (EST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1X9L3K-0001Gn-7g; Mon, 21 Jul 2014 21:23:22 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1X9L1n-0000VZ-85 for kernel-team@lists.ubuntu.com; Mon, 21 Jul 2014 21:21:47 +0000 Received: from c-67-160-228-185.hsd1.ca.comcast.net ([67.160.228.185] helo=fourier) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1X9L1m-0007Mr-Ro; Mon, 21 Jul 2014 21:21:47 +0000 Received: from kamal by fourier with local (Exim 4.82) (envelope-from ) id 1X9L1k-0000gx-Vc; Mon, 21 Jul 2014 14:21:44 -0700 From: Kamal Mostafa To: Mateusz Guzik Subject: [3.8.y.z extended stable] Patch "NFS: populate ->net in mount data when remounting" has been added to staging queue Date: Mon, 21 Jul 2014 14:21:44 -0700 Message-Id: <1405977704-2628-1-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.9.1 X-Extended-Stable: 3.8 Cc: Kamal Mostafa , linux-nfs@vger.kernel.org, Trond Myklebust , linux-kernel@vger.kernel.org, kernel-team@lists.ubuntu.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com This is a note to let you know that I have just added a patch titled NFS: populate ->net in mount data when remounting to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree which can be found at: http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.8.y-queue This patch is scheduled to be released in version 3.8.13.27. If you, or anyone else, feels it should not be added to this tree, please reply to this email. For more information about the 3.8.y.z tree, see https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable Thanks. -Kamal ------ From e6468e9aa021873e938ae5b44c09b873e42bee91 Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Tue, 10 Jun 2014 12:44:12 +0200 Subject: 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 Cc: linux-nfs@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Trond Myklebust Signed-off-by: Kamal Mostafa --- fs/nfs/super.c | 1 + 1 file changed, 1 insertion(+) -- 1.9.1 diff --git a/fs/nfs/super.c b/fs/nfs/super.c index b056b16..f4d000a 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -2167,6 +2167,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);