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:   Mon, 3 Jul 2017 09:01:20 +0200
From:   Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>
To:     Romain Perier <romain.perier@...labora.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-serial@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, Nandor Han <nandor.han@...com>
Subject: Re: [PATCH 5/7] serial: imx: umap sg buffers when DMA channel is
 released

$Subject ~= s/umap/unmap/

On Fri, Jun 30, 2017 at 02:04:44PM +0200, Romain Perier wrote:
> From: Nandor Han <nandor.han@...com>
> 
> This commits unmaps sg buffers when the DMA channel is released
> 
> Signed-off-by: Nandor Han <nandor.han@...com>
> Signed-off-by: Romain Perier <romain.perier@...labora.com>
> ---
>  drivers/tty/serial/imx.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> index e8cf7cf..58d6b1c 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -1215,6 +1215,12 @@ static void imx_stop_tx_dma(struct imx_port *sport)
>  	temp = readl(sport->port.membase + UCR1);
>  	temp &= ~UCR1_TDMAEN;
>  	writel(temp, sport->port.membase + UCR1);
> +
> +	if (sport->dma_is_txing) {
> +		dma_unmap_sg(sport->port.dev, &sport->tx_sgl[0],
> +		sport->dma_tx_nents, DMA_TO_DEVICE);
> +		sport->dma_is_txing = 0;

You don't motivate setting dma_is_txing to zero in the commit log. 

Does this mean the driver leaks memory in the current state?

> +	}
>  }
>  
>  static void imx_stop_rx_dma(struct imx_port *sport)

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ