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] [day] [month] [year] [list]
Message-ID: <046e2bf1-3a7f-8f6e-cf87-797af3e72d23@linaro.org>
Date:   Wed, 10 Feb 2021 16:36:06 +0000
From:   Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To:     Jonathan Marek <jonathan@...ek.ca>, linux-arm-msm@...r.kernel.org
Cc:     Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] misc: fastrpc: fix incorrect usage of dma_map_sgtable



On 08/02/2021 20:04, Jonathan Marek wrote:
> dma_map_sgtable() returns 0 on success, which is the opposite of what this
> code was doing.
> 
> Fixes: 7cd7edb89437 ("misc: fastrpc: fix common struct sg_table related issues")
> Signed-off-by: Jonathan Marek <jonathan@...ek.ca>
> ---

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>

>   drivers/misc/fastrpc.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
> index 70eb5ed942d0..f12e909034ac 100644
> --- a/drivers/misc/fastrpc.c
> +++ b/drivers/misc/fastrpc.c
> @@ -520,12 +520,13 @@ fastrpc_map_dma_buf(struct dma_buf_attachment *attachment,
>   {
>   	struct fastrpc_dma_buf_attachment *a = attachment->priv;
>   	struct sg_table *table;
> +	int ret;
>   
>   	table = &a->sgt;
>   
> -	if (!dma_map_sgtable(attachment->dev, table, dir, 0))
> -		return ERR_PTR(-ENOMEM);
> -
> +	ret = dma_map_sgtable(attachment->dev, table, dir, 0);
> +	if (ret)
> +		table = ERR_PTR(ret);
>   	return table;
>   }
>   
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ