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 BEDD624C098; Tue, 29 Apr 2025 16:53:09 +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=1745945589; cv=none; b=CtV6/a11q/ILW5phFQdA9fTbYY5HtvY01Rxb1tk307JRReI7xrfZZeKJCtQlO43TJ1Fk+wAWT2XdIwwyAZq9i/ObIr0A7fOF6zSmUhKbUkdW0iwcFBSCPg3Fah1Jy6vcYKN2imPMVEgT6YfO5/Vm0q4UJFWcUBzldntrOpuziW4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745945589; c=relaxed/simple; bh=VHCNBK2d2HIbiJ1MO2eS0gOrioQRdZqav36uUIclAbg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SaXb8K6yRq4Lbp1IWLA5VbwMpouLyOuVU5ccXC5zx3ELEGoa0qQ35OSy21RLgUEn34T7bTo4IUbovNGCCOau0YoASAbxJyfJ6fSQEogt/NIvIAebPMlitYkQP7QTdlL0lVTQBWhrPYduKht85xqcserIGB+niue2ehZWgRI11wY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Fleh3uZ5; 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="Fleh3uZ5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CEE8FC4CEE3; Tue, 29 Apr 2025 16:53:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1745945589; bh=VHCNBK2d2HIbiJ1MO2eS0gOrioQRdZqav36uUIclAbg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fleh3uZ5jyzOLlEp1ILZwYoVXPb8lUIARGGADih34x5Cflhm1NzeLk1t/nSny8wdS T7wmfvuqDQGJEzEJ4PCvjgyhZoqcD5wt/Sc+m5M5lJtUk13crPRhPJ+Q8F2XAiQkQ6 zUd2BZIJL8fdf4103mKZmFfhi7ZidLkHdPdfhlZk= 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.4 164/179] dmaengine: dmatest: Fix dmatest waiting less when interrupted Date: Tue, 29 Apr 2025 18:41:45 +0200 Message-ID: <20250429161056.015179249@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250429161049.383278312@linuxfoundation.org> References: <20250429161049.383278312@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.4-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 238936e2dfe2d..6dfa1e038726a 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c @@ -809,9 +809,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