[PATCH 3/4] accel/rocket: Fix the extra iommu_group_get call in rocket_job_handle_irq
Daniel Drake
ddrake at baylibre.com
Tue Nov 17 13:53:47 PST 2026
On 14/08/2026 03:24, Chaoyi Chen wrote:
> From: Chaoyi Chen <chaoyi.chen at rock-chips.com>
>
> The rocket attaches the IOMMU group in rocket_job_run() and detaches it
> in rocket_job_handle_irq(). Calling iommu_group_get() in
> rocket_job_handle_irq() causes the reference count to increase
> unexpectedly. And this causes rocket_core_fini() to fail to release the
> IOMMU group, leading to a resource leak.
While there is a leak here, I think sashiko correct in saying this
change would introduce a crash because core->iommu_group can be set to
NULL before this codepath is reached. That might be a simple fix.
> Fixes: 658ebeac3351 ("accel/rocket: Add IOCTL for BO creation")
Wrong commit mentioned here.
More information about the Linux-rockchip
mailing list