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: <YZKDmb/ZlYwtyX8j@kroah.com>
Date:   Mon, 15 Nov 2021 16:58:17 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Tudor Ambarus <tudor.ambarus@...rochip.com>
Cc:     richard.genoud@...il.com, jirislaby@...nel.org,
        nicolas.ferre@...rochip.com, alexandre.belloni@...tlin.com,
        ludovic.desroches@...rochip.com, linux-serial@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tty: serial: atmel: Check return code of
 dmaengine_submit()

On Mon, Nov 15, 2021 at 04:30:04PM +0200, Tudor Ambarus wrote:
> dma_cookie_t < 0 indicates an error code, check for it.

Very odd changelog text, please be more descriptive about what is
happening here.

> 
> Signed-off-by: Tudor Ambarus <tudor.ambarus@...rochip.com>
> ---
>  drivers/tty/serial/atmel_serial.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 2c99a47a2535..376f7a9c2868 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -1004,6 +1004,11 @@ static void atmel_tx_dma(struct uart_port *port)
>  		desc->callback = atmel_complete_tx_dma;
>  		desc->callback_param = atmel_port;
>  		atmel_port->cookie_tx = dmaengine_submit(desc);
> +		if (dma_submit_error(atmel_port->cookie_tx)) {
> +			dev_err(port->dev, "dma_submit_error %d\n",
> +				atmel_port->cookie_tx);
> +			return;

What can a user do with this error message?

Have you seen this happen in real life?

What commit does this "fix"?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ