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]
Date:	Mon, 08 Aug 2011 19:37:50 +0530
From:	"Koul, Vinod" <vinod.koul@...el.com>
To:	Viresh Kumar <viresh.kumar@...com>
Cc:	dan.j.williams@...el.com, linux-kernel@...r.kernel.org,
	armando.visconti@...com, shiraz.hashim@...com, vipin.kumar@...com,
	rajeev-dlh.kumar@...com, deepak.sikri@...com,
	vipulkumar.samar@...com, amit.virdi@...com, pratyush.anand@...com,
	bhupesh.sharma@...com, viresh.linux@...il.com
Subject: Re: [PATCH] dmaengine/dmatest: Terminate transfers on all channels
 in case of error or exit

On Fri, 2011-07-29 at 16:21 +0530, Viresh Kumar wrote:
> In case, some error occurs while doing memcpy transfers, we must terminate all
> transfers physically too. This is achieved by calling device_control() routine
> with TERMINATE_ALL as parameter.
> 
> This is also required to be done in case module is removed while we are in
> middle of some transfers.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@...com>
Applied, thanks

> ---
>  drivers/dma/dmatest.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
> index b4f5c32..cd8ae03 100644
> --- a/drivers/dma/dmatest.c
> +++ b/drivers/dma/dmatest.c
> @@ -476,6 +476,8 @@ err_srcs:
>  	pr_notice("%s: terminating after %u tests, %u failures (status %d)\n",
>  			thread_name, total_tests, failed_tests, ret);
>  
> +	/* terminate all transfers on specified channels */
> +	chan->device->device_control(chan, DMA_TERMINATE_ALL, 0);
>  	if (iterations > 0)
>  		while (!kthread_should_stop()) {
>  			DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wait_dmatest_exit);
> @@ -498,6 +500,10 @@ static void dmatest_cleanup_channel(struct dmatest_chan *dtc)
>  		list_del(&thread->node);
>  		kfree(thread);
>  	}
> +
> +	/* terminate all transfers on specified channels */
> +	dtc->chan->device->device_control(dtc->chan, DMA_TERMINATE_ALL, 0);
> +
>  	kfree(dtc);
>  }
>  


-- 
~Vinod

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ