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 18116155A4E; Tue, 29 Apr 2025 18:17:40 +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=1745950660; cv=none; b=fPJa9ny3cLw6gRBO9mViG1Q9zmJdckD7jVnYMvvc0JaGY7ewgcyGQqyWkY5A16MvmpIzBsEicEe9pO7osP1YC9I9XZb45cNvUwqLUzOQlY7EDQkMftb9Yy7BeKCBBAa3K5CuFDuCYbD+T6mzi5Tg4vh0zYQNSIa8ff/jOyGvpLc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745950660; c=relaxed/simple; bh=+OZUy+DQgx9LQr5Z9YZ3195ZXBkC56+no9oQybyBGZ8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pETlU4okQpYI10TbkxRAfkJ9phubAtnSx3cB4suQ/onSJr30Lrj/uG0W1MjdjlufndW+uLuQBUZ573LYAYdNme6iVlLw6/7IvtcnIODpXbzTTRHkd6lhzdRwR9Y4t6lxCOERTWnUav1x8VrhbYqNfqKg37e9jCUB+ibNbQ+D/Ag= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AkoCv6un; 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="AkoCv6un" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9249AC4CEE3; Tue, 29 Apr 2025 18:17:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1745950660; bh=+OZUy+DQgx9LQr5Z9YZ3195ZXBkC56+no9oQybyBGZ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AkoCv6unbNCvSPspyKGuleNzYBV4hO1UABk8C0gmOisgDlSfe+tjbSY0lslnR36zw JqbgRWLQ1vyqC4Ph19h+S2rTyc+7mTuscp1zNVu2zZSEjwsGhWsHUY2OVm9GqO++Y/ sccu6bRVObt3iqLm9NCnrFqeTJuP2t+GOb6sLJo4= 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.6 136/204] dmaengine: dmatest: Fix dmatest waiting less when interrupted Date: Tue, 29 Apr 2025 18:43:44 +0200 Message-ID: <20250429161104.999316596@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250429161059.396852607@linuxfoundation.org> References: <20250429161059.396852607@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.6-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 ffe621695e472..78b8a97b23637 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c @@ -827,9 +827,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