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: <0a0834d23f3d6d339bc26b73e2af6fe038e7deab.camel@collabora.com>
Date: Mon, 11 Aug 2025 10:20:31 -0400
From: Nicolas Dufresne <nicolas.dufresne@...labora.com>
To: Dan Carpenter <dan.carpenter@...aro.org>, Ezequiel Garcia
	 <ezequiel@...guardiasur.com.ar>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>, Greg Kroah-Hartman
	 <gregkh@...uxfoundation.org>, Hans Verkuil <hverkuil@...all.nl>, Detlev
 Casanova <detlev.casanova@...labora.com>, linux-media@...r.kernel.org, 
	linux-rockchip@...ts.infradead.org, linux-staging@...ts.linux.dev, 
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] media: rkvdec: Fix a NULL vs IS_ERR() bug in probe()

Hi Dan,

Le mercredi 25 juin 2025 à 10:23 -0500, Dan Carpenter a écrit :
> The iommu_paging_domain_alloc() function doesn't return NULL on error it
> returns error pointers.  Update the check and then set ->empty_domain to
> NULL because the rest of the driver assumes it can be NULL.
> 
> Fixes: ff8c5622f9f7 ("media: rkvdec: Restore iommu addresses on errors")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
>  drivers/staging/media/rkvdec/rkvdec.c | 4 +++-

I've re-applied to the now de-staged driver, and will send that as fixes for
6.17.

thanks,
Nicolas

>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/rkvdec/rkvdec.c
> b/drivers/staging/media/rkvdec/rkvdec.c
> index d707088ec0dc..1b7f27e4d961 100644
> --- a/drivers/staging/media/rkvdec/rkvdec.c
> +++ b/drivers/staging/media/rkvdec/rkvdec.c
> @@ -1162,8 +1162,10 @@ static int rkvdec_probe(struct platform_device *pdev)
>  	if (iommu_get_domain_for_dev(&pdev->dev)) {
>  		rkvdec->empty_domain = iommu_paging_domain_alloc(rkvdec-
> >dev);
>  
> -		if (!rkvdec->empty_domain)
> +		if (IS_ERR(rkvdec->empty_domain)) {
> +			rkvdec->empty_domain = NULL;
>  			dev_warn(rkvdec->dev, "cannot alloc new empty
> domain\n");
> +		}
>  	}
>  
>  	vb2_dma_contig_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32));

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ