lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3dc1c3cb-b19a-4fa5-86b9-0862a96418d1@intel.com>
Date: Wed, 5 Mar 2025 16:14:15 -0700
From: Dave Jiang <dave.jiang@...el.com>
To: Vinicius Costa Gomes <vinicius.gomes@...el.com>,
 Vinod Koul <vkoul@...nel.org>, dmaengine@...r.kernel.org,
 linux-kernel@...r.kernel.org
Cc: kristen.c.accardi@...el.com, kernel test robot <oliver.sang@...el.com>
Subject: Re: [PATCH v1] dmaengine: dmatest: Fix dmatest waiting less when
 interrupted



On 3/5/25 4:00 PM, Vinicius Costa Gomes wrote:
> 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 <oliver.sang@...el.com>
> Closes: https://lore.kernel.org/oe-lkp/202502171134.8c403348-lkp@intel.com
> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@...el.com>

Reviewed-by: Dave Jiang <dave.jiang@...el.com>

> ---
>  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 91b2fbc0b864..d891dfca358e 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);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ