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]
Message-ID: <20170630141329.6144cddd@karo-electronics.de>
Date:   Fri, 30 Jun 2017 14:13:29 +0200
From:   Lothar Waßmann <LW@...O-electronics.de>
To:     Romain Perier <romain.perier@...labora.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Nandor Han <nandor.han@...com>,
        linux-arm-kernel@...ts.infradead.org, linux-serial@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/7] serial: imx: init dma_is_{rx|tx}ing variables

Hi,

On Fri, 30 Jun 2017 14:04:42 +0200 Romain Perier wrote:
> From: Nandor Han <nandor.han@...com>
> 
> Initialize both dma_is_{rx|tx}ing variables when DMA is enabled to avoid
> checking uninitialized variables if port shutdown is requested before
> DMA channels get a chance to start.
> 
> Signed-off-by: Nandor Han <nandor.han@...com>
> Signed-off-by: Romain Perier <romain.perier@...labora.com>
> ---
>  drivers/tty/serial/imx.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> index 188063d..81fb413 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -1225,6 +1225,9 @@ static void imx_enable_dma(struct imx_port *sport)
>  
>  	imx_setup_ufcr(sport, TXTL_DMA, RXTL_DMA);
>  
> +	sport->dma_is_rxing = 0;
> +	sport->dma_is_txing = 0;
> +
>  	sport->dma_is_enabled = 1;
>  }
>  
sport is devm_kzalloc()ed, so the variables are initialized to 0 anyway.


Lothar Waßmann

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ