Skip to contentSkip to conversation

NFSv4.1: Fix a deadlock in layoutget

PATCH New Trond Myklebust 1 participant 1 message Jan 24, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFSv4.1: Fix a deadlock in layoutget

We cannot call nfs4_handle_exception() without first ensuring that the slot has been freed. If not, we end up deadlocking with the process waiting for recovery to complete, and recovery waiting for the slot table to drain.

Fixes 2e80dbe7ac51 ("NFSv4.1: Close callback races for OPEN, LAYOUTGET...")
---
 fs/nfs/nfs4proc.c | 1 +
 1 file changed, 1 insertion(+)
fs/nfs/nfs4proc.c +1 -0
index ecc151697fd4..59bb574d7d7c 100644
@@ -8490,6 +8490,7 @@ nfs4_layoutget_handle_exception(struct rpc_task *task,
 		goto out;
 	}
 
+	nfs4_sequence_free_slot(&lgp->res.seq_res);
 	err = nfs4_handle_exception(server, nfs4err, exception);
 	if (!status) {
 		if (exception->retry)
Signature · 1 line
2.9.3