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: <800b190c9f1c213c81d0d1dbf09015892edab29e.camel@collabora.com>
Date: Tue, 05 Aug 2025 08:05:14 -0400
From: Nicolas Dufresne <nicolas.dufresne@...labora.com>
To: Miaoqian Lin <linmq006@...il.com>, Detlev Casanova	
 <detlev.casanova@...labora.com>, Mauro Carvalho Chehab
 <mchehab@...nel.org>,  Heiko Stuebner	 <heiko@...ech.de>, Hans Verkuil
 <hverkuil@...nel.org>, 	linux-media@...r.kernel.org,
 linux-rockchip@...ts.infradead.org, 	linux-arm-kernel@...ts.infradead.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: rkvdec: Fix incorrect NULL check for
 iommu_paging_domain_alloc

Hi,

Le mardi 05 août 2025 à 10:18 +0400, Miaoqian Lin a écrit :
> iommu_paging_domain_alloc returns error pointers on failure.
> Replace the NULL check with IS_ERR to correctly handle error cases
> and avoid invalid pointer dereference.
> 
> Fixes: ff8c5622f9f7 ("media: rkvdec: Restore iommu addresses on errors")
> Signed-off-by: Miaoqian Lin <linmq006@...il.com>
> ---
>  drivers/media/platform/rockchip/rkvdec/rkvdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/rockchip/rkvdec/rkvdec.c
> b/drivers/media/platform/rockchip/rkvdec/rkvdec.c
> index d707088ec0dc..1d40e81f44b9 100644
> --- a/drivers/media/platform/rockchip/rkvdec/rkvdec.c
> +++ b/drivers/media/platform/rockchip/rkvdec/rkvdec.c
> @@ -1162,7 +1162,7 @@ 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))


Thanks for the fix, but Dan Carpenter have already sent this fix. It will be
included soon.

https://lore.kernel.org/linux-media/696219e9-a1c7-4c87-b15c-1ffd42c95d58@sabinyo.mountain/

regards,
Nicolas

>  			dev_warn(rkvdec->dev, "cannot alloc new empty
> domain\n");
>  	}
>  

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