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:   Thu, 21 Mar 2019 17:31:51 +0800
From:   Bo YU <tsu.yubo@...il.com>
To:     Arnd Bergmann <arnd@...db.de>,
        Kroah-Hartman <gregkh@...uxfoundation.org>,
        open list <linux-kernel@...r.kernel.org>,
        于波 <yuzibode@....com>
Subject: Re: [PATCH] misc/fastrpc: add checked value for dma_set_mask

On Tue, Mar 19, 2019 at 10:05 AM Bo YU <tsu.yubo@...il.com> wrote:
>
> There be should check return value from dma_set_mask to throw some infos
> if fail to set dma mask.
>
> Detected by CoverityScan, CID# 1443983:  Error handling issues (CHECKED_RETURN)
>
> Fixes:f6f9279f2bf0 (misc: fastrpc: Add Qualcomm fastrpc basic driver model)
> Signed-off-by: Bo YU <tsu.yubo@...il.com>
> ---
>  drivers/misc/fastrpc.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
> index 39f832d27288..36d0d5c9cfba 100644
> --- a/drivers/misc/fastrpc.c
> +++ b/drivers/misc/fastrpc.c
> @@ -1184,6 +1184,7 @@ static int fastrpc_cb_probe(struct platform_device *pdev)
>         struct fastrpc_session_ctx *sess;
>         struct device *dev = &pdev->dev;
>         int i, sessions = 0;
> +       int rc;
>
>         cctx = dev_get_drvdata(dev->parent);
>         if (!cctx)
> @@ -1213,7 +1214,11 @@ static int fastrpc_cb_probe(struct platform_device *pdev)
>         }
>         cctx->sesscount++;
>         spin_unlock(&cctx->lock);
> -       dma_set_mask(dev, DMA_BIT_MASK(32));
> +       rc = dma_set_mask(dev, DMA_BIT_MASK(32));
> +       if (rc) {
> +               dev_err(dev, "32-bit DMA enable failed\n");
> +               return rc;
> +       }
>
Ping?
Do me need resend it?
>         return 0;
>  }
> --
> 2.11.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ