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 502C22AE96; Tue, 29 Apr 2025 17:58:04 +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=1745949484; cv=none; b=GjE6Pj09DveB73eSxEyWmQlvTnuwnH0XxjpJpgXFe3+74WC0kwI7KsKbmWbcRfZRAcPXMknMviIwLQJsJMkDFZhlyYkDpLyz6DVlZh5hW1Zk6rnev2X0cLyXsqK6BbXze9jdpLAV02LBjnZR5C1KPM61wMVVg9O2gtdSznzdumU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745949484; c=relaxed/simple; bh=sOOr0jY1fo7G7qL6ESNeDi0kbuPDurIsSy/hXOVnqYU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EPZ3k4JID0oosZx1A6omL+qcnkJ1dL9X4MkEQi20Q3r6vzG1N24yReifWWH8wVIOKwfRE9tFFD49kkdiDUZCuRdhWf/dSPRQOOhWMOb+2FZw28FP02eMlAgUEH8DDXFlGiDKW8smkgKLI4mK2ALsTh8jmRVW4uq6YjHXmlcFisE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ZWMCJuBT; 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="ZWMCJuBT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2861C4CEE3; Tue, 29 Apr 2025 17:58:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1745949484; bh=sOOr0jY1fo7G7qL6ESNeDi0kbuPDurIsSy/hXOVnqYU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZWMCJuBTu/cUbWL+Jo3UCy1R9XlTEwYl703O9z+W7bsu+/qZ9C9a6PmrhfC63y2ZI Yp71iAR48zKIj+VilX/5lhsPW+TgA5q4CVH9FGsc0DiwHF5CyWt6B5SAay5ASEjTF0 X1u+X/rcgHzGx/LqnV3IIsvU7LHxvgJKCT/sgNaE= 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 5.15 333/373] dmaengine: dmatest: Fix dmatest waiting less when interrupted Date: Tue, 29 Apr 2025 18:43:30 +0200 Message-ID: <20250429161136.828594631@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250429161123.119104857@linuxfoundation.org> References: <20250429161123.119104857@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 5.15-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 f696246f57fdb..0d8d01673010c 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c @@ -828,9 +828,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