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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 19 Sep 2018 17:38:51 -0700
From:   Vinod <vkoul@...nel.org>
To:     Sasha Levin <Alexander.Levin@...rosoft.com>
Cc:     "stable@...r.kernel.org" <stable@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: Re: [PATCH AUTOSEL 4.9 30/34] dmaengine: hsu: Support
 dmaengine_terminate_sync()

On 15-09-18, 01:34, Sasha Levin wrote:
> From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> 
> [ Upstream commit 2abc66cd499aa16876e45c6438788902f7d1ce22 ]
> 
> It appears that the driver misses the support of dmaengine_terminate_sync().
> Since many of callers expects this behaviour implement the new
> device_synchronize() callback to allow proper synchronization when stopping
> a channel.

This adds missing support for an optional call, but I am not aware of
any reports of breakage due to missing this patch. Do you want to carry
this for stable?

> Fixes: b36f09c3c441 ("dmaengine: Add transfer termination synchronization support")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> Signed-off-by: Vinod Koul <vkoul@...nel.org>
> Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
> ---
>  drivers/dma/hsu/hsu.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/dma/hsu/hsu.c b/drivers/dma/hsu/hsu.c
> index 29d04ca71d52..202ffa9f7611 100644
> --- a/drivers/dma/hsu/hsu.c
> +++ b/drivers/dma/hsu/hsu.c
> @@ -413,6 +413,13 @@ static void hsu_dma_free_chan_resources(struct dma_chan *chan)
>  	vchan_free_chan_resources(to_virt_chan(chan));
>  }
>  
> +static void hsu_dma_synchronize(struct dma_chan *chan)
> +{
> +	struct hsu_dma_chan *hsuc = to_hsu_dma_chan(chan);
> +
> +	vchan_synchronize(&hsuc->vchan);
> +}
> +
>  int hsu_dma_probe(struct hsu_dma_chip *chip)
>  {
>  	struct hsu_dma *hsu;
> @@ -459,6 +466,7 @@ int hsu_dma_probe(struct hsu_dma_chip *chip)
>  	hsu->dma.device_pause = hsu_dma_pause;
>  	hsu->dma.device_resume = hsu_dma_resume;
>  	hsu->dma.device_terminate_all = hsu_dma_terminate_all;
> +	hsu->dma.device_synchronize = hsu_dma_synchronize;
>  
>  	hsu->dma.src_addr_widths = HSU_DMA_BUSWIDTHS;
>  	hsu->dma.dst_addr_widths = HSU_DMA_BUSWIDTHS;
> -- 
> 2.17.1

-- 
~Vinod

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ