Skip to contentSkip to conversation

Patch "nfs: always update creds in mirror, even when we have an already connected ds" has been added to the 4.1-stable tree

PATCH [email protected] 1 participant 1 message Jul 31, 2015

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

nfs: always update creds in mirror, even when we have an already connected ds

to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
nfs-always-update-creds-in-mirror-even-when-we-have-an-already-connected-ds.patch
and it can be found in the queue-4.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 0c8315dd56577445dd1afe6b9cfa06b7efdf2f82 Mon Sep 17 00:00:00 2001

From: Jeff Layton <[email protected]>
Date: Wed, 24 Jun 2015 12:10:24 -0400
Subject: nfs: always update creds in mirror, even when we have an already connected ds

From: Jeff Layton <[email protected]>

commit 0c8315dd56577445dd1afe6b9cfa06b7efdf2f82 upstream.

A ds can be associated with more than one mirror, but we currently skip setting a mirror's credentials if we find that it's already set up with a connected client.

The upshot is that we can end up sending DS writes with MDS credentials instead of properly setting them up. Fix nfs4_ff_layout_prepare_ds to always verify that the mirror's credentials are set up, even when we have a DS that's already connected.

---
 fs/nfs/flexfilelayout/flexfilelayoutdev.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/nfs/flexfilelayout/flexfilelayoutdev.c +2 -2
@@ -387,7 +387,7 @@ nfs4_ff_layout_prepare_ds(struct pnfs_la
 	/* matching smp_wmb() in _nfs4_pnfs_v3/4_ds_connect */
 	smp_rmb();
 	if (ds->ds_clp)
-		goto out;
+		goto out_update_creds;
 
 	flavor = nfs4_ff_layout_choose_authflavor(mirror);
 
@@ -431,7 +431,7 @@ nfs4_ff_layout_prepare_ds(struct pnfs_la
 			}
 		}
 	}
-
+out_update_creds:
 	if (ff_layout_update_mirror_cred(mirror, ds))
 		ds = NULL;
 out:

Patches currently in stable-queue which might be from [email protected] are

queue-4.1/nfs-increase-size-of-exchange_id-name-string-buffer.patch queue-4.1/nfs-always-update-creds-in-mirror-even-when-we-have-an-already-connected-ds.patch queue-4.1/nfs-fix-potential-credential-leak-in-ff_layout_update_mirror_cred.patch