[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2196043.OBFZWjSADL@diego>
Date: Tue, 05 Aug 2025 10:40:02 +0200
From: Heiko StĂĽbner <heiko@...ech.de>
To: Detlev Casanova <detlev.casanova@...labora.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Nicolas Dufresne <nicolas.dufresne@...labora.com>,
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, Miaoqian Lin <linmq006@...il.com>
Cc: linmq006@...il.com
Subject:
Re: [PATCH] media: rkvdec: Fix incorrect NULL check for
iommu_paging_domain_alloc
Am Dienstag, 5. August 2025, 08:18:33 Mitteleuropäische Sommerzeit schrieb Miaoqian Lin:
> 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>
Going from the (static inline) function definition [0] to the
iommu_paging_domain_alloc_flags() function [1] it uses, the doc states
"Return [...] or an ERR pointer for failure."
So this is the correct fix,
Reviewed-by: Heiko Stuebner <heiko@...ech.de>
[0] https://elixir.bootlin.com/linux/v6.16/source/include/linux/iommu.h#L858
[1] https://elixir.bootlin.com/linux/v6.16/source/drivers/iommu/iommu.c#L2046
Powered by blists - more mailing lists