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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 6 Apr 2020 11:51:27 -0300
From:   Fabio Estevam <festevam@...il.com>
To:     Michael Walle <michael@...le.cc>
Cc:     linux-kernel <linux-kernel@...r.kernel.org>,
        linux-serial@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>,
        Colin Ian King <colin.king@...onical.com>,
        NXP Linux Team <linux-imx@....com>
Subject: Re: [PATCH] tty: serial: fsl_lpuart: make coverity happy

On Fri, Apr 3, 2020 at 2:50 PM Michael Walle <michael@...le.cc> wrote:
>
> Coverity reports the following:
>
>   var_compare_op: Comparing chan to null implies that chan might be null.
>
>   1234        if (chan)
>   1235                dmaengine_terminate_all(chan);
>   1236
>
>   Dereference after null check (FORWARD_NULL)
>   var_deref_op: Dereferencing null pointer chan.
>
>   1237        dma_unmap_sg(chan->device->dev, &sport->rx_sgl, 1, DMA_FROM_DEVICE);
>
> Technically, this is correct. But lpuart_dma_rx_free() is guarded by
> lpuart_dma_rx_use which is only true if there is a dma channel, see
> lpuart_rx_dma_startup(). In any way, this looks bogus. So remove
> the superfluous "if (chan)" check and make coverity happy.
>
> Fixes: a092ab25fdaa ("tty: serial: fsl_lpuart: fix DMA mapping")
> Signed-off-by: Michael Walle <michael@...le.cc>
> Reported-by: Colin Ian King <colin.king@...onical.com>

Reviewed-by: Fabio Estevam <festevam@...il.com>

Powered by blists - more mailing lists