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: <50bfdb3f-f6fe-b0ef-4214-5d533d45e89c@wanadoo.fr>
Date:   Fri, 26 Aug 2022 12:31:15 +0200
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     Jack Wang <jinpu.wang@...os.com>,
        alexander.shishkin@...ux.intel.com
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] intel_th: Fix dma_map_sg error check

Le 26/08/2022 à 12:15, Jack Wang a écrit :
> dma_map_sg return 0 on error.
> 
> Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
> Cc: linux-kernel@...r.kernel.org
> Fixes: 4e0eaf239fb3 ("intel_th: msu: Fix single mode with IOMMU")
> Signed-off-by: Jack Wang <jinpu.wang@...os.com>
> ---
>   drivers/hwtracing/intel_th/msu.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c
> index 6c8215a47a60..b49237d56a60 100644
> --- a/drivers/hwtracing/intel_th/msu.c
> +++ b/drivers/hwtracing/intel_th/msu.c
> @@ -931,7 +931,7 @@ static int msc_buffer_contig_alloc(struct msc *msc, unsigned long size)
>   
>   	ret = dma_map_sg(msc_dev(msc)->parent->parent, msc->single_sgt.sgl, 1,
>   			 DMA_FROM_DEVICE);
> -	if (ret < 0)
> +	if (!ret)

Missing ret = -EIO?
like in other patches?

CJ

>   		goto err_free_pages;
>   
>   	msc->nr_pages = nr_pages;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ