linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] NFS: Clear key construction data if the idmap upcall fails
@ 2012-08-07 15:30 bjschuma
  2012-08-07 15:44 ` Myklebust, Trond
  0 siblings, 1 reply; 4+ messages in thread
From: bjschuma @ 2012-08-07 15:30 UTC (permalink / raw)
  To: Trond.Myklebust; +Cc: linux-nfs, joro, mdauchy

From: Bryan Schumaker <bjschuma@netapp.com>

idmap_pipe_downcall already clears this field if the upcall succeeds,
but if it fails (rpc.idmapd isn't running) the field will still be set
on the next call triggering a BUG_ON().

Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
---
 fs/nfs/idmap.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c
index b701358..645cfe7 100644
--- a/fs/nfs/idmap.c
+++ b/fs/nfs/idmap.c
@@ -683,10 +683,12 @@ static int nfs_idmap_legacy_upcall(struct key_construction *cons,
 
 	ret = rpc_queue_upcall(idmap->idmap_pipe, msg);
 	if (ret < 0)
-		goto out2;
+		goto out3;
 
 	return ret;
 
+out3:
+	idmap->idmap_key_cons = NULL;
 out2:
 	kfree(im);
 out1:
-- 
1.7.11.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-08-07 16:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-07 15:30 [PATCH] NFS: Clear key construction data if the idmap upcall fails bjschuma
2012-08-07 15:44 ` Myklebust, Trond
2012-08-07 15:52   ` Bryan Schumaker
2012-08-07 16:00     ` Myklebust, Trond

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).