From 03d16b35fae07dba08e42ea27961ad32df128db8 Mon Sep 17 00:00:00 2001
From: rread <rread>
Date: Thu, 12 Feb 2004 01:28:08 +0000
Subject: [PATCH] b=2699

Make sure this request was replied before unpacking, and if not return
an error.
---
 lustre/ptlrpc/client.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c
index 12cf867dea..fdc1b37a87 100644
--- a/lustre/ptlrpc/client.c
+++ b/lustre/ptlrpc/client.c
@@ -1489,6 +1489,11 @@ static int ptlrpc_replay_interpret(struct ptlrpc_request *req,
         unsigned long flags;
 
         atomic_dec(&imp->imp_replay_inflight);
+        
+        if (!req->rq_replied) {
+                CERROR("request replay timed out, restarting recovery\n");
+                GOTO(out, rc = -ETIMEDOUT);
+        }
 
 #if SWAB_PARANOIA
         /* Clear reply swab mask; this is a new reply in sender's byte order */
-- 
GitLab