On Tue, 11 Aug 2026 09:11:54 +0300, Alexandru Dadu wrote:
> -     WARN_ON(pvr_dev->lost);
> +     if (pvr_dev->lost)
> +             return -EIO;

kccb.reserved_count is only decremented further down, past both WARN_ON()s,
so this returns with the slot pvr_queue_prepare_job() reserved still held.

That path keeps being taken: pvr_power_reset()'s err_device_lost still calls
pvr_queue_device_post_reset(), which starts every queue again, so jobs go on
reaching run_job() after the device is lost.  Each one then leaks a
reservation, and pvr_kccb_fini() ends on

        WARN_ON(pvr_dev->kccb.reserved_count);

pvr_kccb_release_slot() is meant for this ("Should only be called if
something failed after the pvr_kccb_reserve_slot() call"), but it has no
callers yet, so the ERR_PTR returns already in pvr_queue_run_job() lose the
reservation the same way.  Might be worth handling in one place.

Thanks,
Zhan Xusheng

Reply via email to