public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] NFSv4: Fix a slot leak in nfs40_sequence_done
@ 2014-01-29 17:36 Trond Myklebust
  2014-01-29 17:36 ` [PATCH 2/3] NFSv4.1: Clean up nfs41_sequence_done Trond Myklebust
  2014-01-30 16:49 ` [PATCH 1/3] NFSv4: Fix a slot leak in nfs40_sequence_done Chuck Lever
  0 siblings, 2 replies; 8+ messages in thread
From: Trond Myklebust @ 2014-01-29 17:36 UTC (permalink / raw)
  To: linux-nfs; +Cc: Trond Myklebust, Chuck Lever

The check for whether or not we sent an RPC call in nfs40_sequence_done
is insufficient to decide whether or not we are holding a session slot,
and thus should not be used to decide when to free that slot.

This patch replaces the RPC_WAS_SENT() test with the correct test for
whether or not slot == NULL.

Cc: Chuck Lever <chuck.lever@oracle.com>
Cc: stable@vger.kernel.org # 3.12+
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
---
 fs/nfs/nfs4proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index ae00c3ed733f..493e9cce1f11 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -539,7 +539,7 @@ static int nfs40_sequence_done(struct rpc_task *task,
 	struct nfs4_slot *slot = res->sr_slot;
 	struct nfs4_slot_table *tbl;
 
-	if (!RPC_WAS_SENT(task))
+	if (slot == NULL)
 		goto out;
 
 	tbl = slot->table;
-- 
1.8.5.3


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

end of thread, other threads:[~2014-01-30 17:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-29 17:36 [PATCH 1/3] NFSv4: Fix a slot leak in nfs40_sequence_done Trond Myklebust
2014-01-29 17:36 ` [PATCH 2/3] NFSv4.1: Clean up nfs41_sequence_done Trond Myklebust
2014-01-29 17:36   ` [PATCH 3/3] NFSv4.1: Cleanup Trond Myklebust
2014-01-30 16:49 ` [PATCH 1/3] NFSv4: Fix a slot leak in nfs40_sequence_done Chuck Lever
2014-01-30 16:55   ` Trond Myklebust
2014-01-30 17:02     ` Chuck Lever
2014-01-30 17:03       ` Trond Myklebust
2014-01-30 17:06         ` Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox