From 5da99051e58b9e9079b66a275d6c47e1e109eee5 Mon Sep 17 00:00:00 2001 From: Oleg Drokin Date: Fri, 23 Oct 2020 02:56:04 -0400 Subject: [PATCH] LU-14069 ldlm: Fix unbounded OBD_FAIL_LDLM_CANCEL_BL_CB_RACE wait in ldlm_handle_cp_callback the while loop is clearly supposed to be limited by the "to" value of 1 second, but is not. Seems to have been broken by all the Solaris porting in HEAD all the way back in 2008. Restore the to assignment to make it not hang indefinitely. Change-Id: I449bfd7f585ab7db475fb3fd4cbbd876126ff789 Fixes: adde80ff ("Land b_head_libcfs onto HEAD") Signed-off-by: Oleg Drokin Reviewed-on: https://review.whamcloud.com/40375 Reviewed-by: Mike Pershin Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- lustre/ldlm/ldlm_lockd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index ca0729c..de10643 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -1927,7 +1927,7 @@ static int ldlm_handle_cp_callback(struct ptlrpc_request *req, ldlm_callback_reply(req, 0); while (to > 0) { - schedule_timeout_interruptible(to); + to = schedule_timeout_interruptible(to); if (ldlm_is_granted(lock) || ldlm_is_destroyed(lock)) break; -- 1.8.3.1