From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C48B922A81D; Tue, 29 Apr 2025 17:06:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745946396; cv=none; b=mwXvBBYBf5/87rqU0LLkies9fBA6o3bNB7QQvMgzpsDc+lFWIJuhfuxcWkBSj2RGcq+Cl3qA94Wp2zo5P9vh0vafSSGofhT456Y9vBDr7URuRTmkyCVv8eO/Ib7sCFoX0ZaBWFJAhecSVcrMU1869qyRNhDXG5H9NttBAKUYwtc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745946396; c=relaxed/simple; bh=0RFffxN6E/3jiz7EKs7/4E3/X/WxaSgWb4qqvc0vG6U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=k1epkpMa1Hm/DbsRe8NcnZUx9yTRZEk99KRw85tujeJHlRejdf3Z+0bGNchNgss8b0qFh49+Lt0QCTK7PygU9OKDDlCv0IT4zLZ5Yg0t43dWSEa5Vr9Xtx4AeKnUU05OFEiV2t51B+I1r3A3+rhjLCEFRc9H9f44KgnVRclF/CY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2wOMKWnr; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="2wOMKWnr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A470C4CEE9; Tue, 29 Apr 2025 17:06:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1745946396; bh=0RFffxN6E/3jiz7EKs7/4E3/X/WxaSgWb4qqvc0vG6U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2wOMKWnrV6g6NgQHvlzEiqA3SKkRY0e+3d7uKSTKj6Q5XmoR1dOXlYx0uMV+Kthnf GqePC0Cp1uh51gaOF4JNQyVF48b35JqQ8c/hv1LCmjjDCNNK1rTq8ZdKJ9D+ahcKIj +cQQPEZCQETdvbvVFlXDj29m7JTtTRroAQbzlFbU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, kernel test robot , Vinicius Costa Gomes , Dave Jiang , Vinod Koul , Sasha Levin Subject: [PATCH 6.14 213/311] dmaengine: dmatest: Fix dmatest waiting less when interrupted Date: Tue, 29 Apr 2025 18:40:50 +0200 Message-ID: <20250429161129.723413691@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250429161121.011111832@linuxfoundation.org> References: <20250429161121.011111832@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Vinicius Costa Gomes [ Upstream commit e87ca16e99118ab4e130a41bdf12abbf6a87656c ] Change the "wait for operation finish" logic to take interrupts into account. When using dmatest with idxd DMA engine, it's possible that during longer tests, the interrupt notifying the finish of an operation happens during wait_event_freezable_timeout(), which causes dmatest to cleanup all the resources, some of which might still be in use. This fix ensures that the wait logic correctly handles interrupts, preventing premature cleanup of resources. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202502171134.8c403348-lkp@intel.com Signed-off-by: Vinicius Costa Gomes Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20250305230007.590178-1-vinicius.gomes@intel.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/dmatest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index 91b2fbc0b8647..d891dfca358e2 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c @@ -841,9 +841,9 @@ static int dmatest_func(void *data) } else { dma_async_issue_pending(chan); - wait_event_freezable_timeout(thread->done_wait, - done->done, - msecs_to_jiffies(params->timeout)); + wait_event_timeout(thread->done_wait, + done->done, + msecs_to_jiffies(params->timeout)); status = dma_async_is_tx_complete(chan, cookie, NULL, NULL); -- 2.39.5