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 26A4E24886F; Tue, 20 May 2025 14:09:47 +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=1747750187; cv=none; b=c/xUPYlZtaS79UKu0B0Oulc29J1uJB6iJYGk0MYpYwyVSkl5q07VCHxo5sTSp4Mwi3prqW7JRS3arwhwFz4V+Rzi95GWuiyjYuLCNFCiNzHbj8p/KCMU7jdlRTBqlDfFFga7H8llOvZD1BP74f5u4kdphNWkgi5L8bWsXUFTkMg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747750187; c=relaxed/simple; bh=dldcpI9yjuu+6ETfjCA3wSJIsqXwVG9xfF1mFznKXJg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RvCdyEHOu5EBKFKuqO/3v/QA5t8LVyOvDEXIjRiiq8/d28oeUOBmNy/19I1AUayvBNYag8bNABDCAdgYQwuM9nPrPGhsnTQVypSjJnwEPNCy8vrPR8jq4H96w90f6BUnXDmuWG8+IuguowFBCNRRWOLIDs0y4II7r7NloxXBX2s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Fk46oB4h; 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="Fk46oB4h" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92C86C4CEE9; Tue, 20 May 2025 14:09:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1747750187; bh=dldcpI9yjuu+6ETfjCA3wSJIsqXwVG9xfF1mFznKXJg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fk46oB4hYxe+oPLqpgrClwjf3GjXHUX9su3dH73QeCYBbXUH1g9YWLW+T44gDDh/a w4SqiqPbua0ogA/XB2LVzeemWot1DCZe96QLMTszMwWm0lw0VkOpZwxvsX+AmPft3s QlbatQUMFCiGUsRASwQwZd6MmKPUIpV3tc/+ldFU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Nathan Lynch , Vinod Koul Subject: [PATCH 6.12 069/143] dmaengine: Revert "dmaengine: dmatest: Fix dmatest waiting less when interrupted" Date: Tue, 20 May 2025 15:50:24 +0200 Message-ID: <20250520125812.782502430@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250520125810.036375422@linuxfoundation.org> References: <20250520125810.036375422@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.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nathan Lynch commit df180e65305f8c1e020d54bfc2132349fd693de1 upstream. Several issues with this change: * The analysis is flawed and it's unclear what problem is being fixed. There is no difference between wait_event_freezable_timeout() and wait_event_timeout() with respect to device interrupts. And of course "the interrupt notifying the finish of an operation happens during wait_event_freezable_timeout()" -- that's how it's supposed to work. * The link at the "Closes:" tag appears to be an unrelated use-after-free in idxd. * It introduces a regression: dmatest threads are meant to be freezable and this change breaks that. See discussion here: https://lore.kernel.org/dmaengine/878qpa13fe.fsf@AUSNATLYNCH.amd.com/ Fixes: e87ca16e9911 ("dmaengine: dmatest: Fix dmatest waiting less when interrupted") Signed-off-by: Nathan Lynch Link: https://lore.kernel.org/r/20250403-dmaengine-dmatest-revert-waiting-less-v1-1-8227c5a3d7c8@amd.com Signed-off-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman --- drivers/dma/dmatest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- 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_timeout(thread->done_wait, - done->done, - msecs_to_jiffies(params->timeout)); + wait_event_freezable_timeout(thread->done_wait, + done->done, + msecs_to_jiffies(params->timeout)); status = dma_async_is_tx_complete(chan, cookie, NULL, NULL);