[PATCH v1 0/2] Fix dma_resv_wait_timeout() return handling in rocket/panfrost ioctls

Gyeyoung Baek posted 2 patches 1 month, 4 weeks ago
drivers/accel/rocket/rocket_gem.c       | 2 ++
drivers/gpu/drm/panfrost/panfrost_drv.c | 2 ++
2 files changed, 4 insertions(+)
[PATCH v1 0/2] Fix dma_resv_wait_timeout() return handling in rocket/panfrost ioctls
Posted by Gyeyoung Baek 1 month, 4 weeks ago
dma_resv_wait_timeout() returns a positive 'long' (remaining jiffies)
on success, which is truncated to 'int`.
So userspace interpret that as an error.

Each patch explicitly sets `ret` to 0 on the
success path.

Gyeyoung Baek (2):
  accel/rocket: Fix prep_bo ioctl leaking positive return from
    dma_resv_wait_timeout()
  drm/panfrost: Fix wait_bo ioctl leaking positive return from
    dma_resv_wait_timeout()

 drivers/accel/rocket/rocket_gem.c       | 2 ++
 drivers/gpu/drm/panfrost/panfrost_drv.c | 2 ++
 2 files changed, 4 insertions(+)

-- 
2.43.0
Re: [PATCH v1 0/2] Fix dma_resv_wait_timeout() return handling in rocket/panfrost ioctls
Posted by Steven Price 1 month, 1 week ago
On 19/04/2026 08:17, Gyeyoung Baek wrote:
> dma_resv_wait_timeout() returns a positive 'long' (remaining jiffies)
> on success, which is truncated to 'int`.
> So userspace interpret that as an error.
> 
> Each patch explicitly sets `ret` to 0 on the
> success path.
> 
> Gyeyoung Baek (2):
>   accel/rocket: Fix prep_bo ioctl leaking positive return from
>     dma_resv_wait_timeout()
>   drm/panfrost: Fix wait_bo ioctl leaking positive return from
>     dma_resv_wait_timeout()
> 
>  drivers/accel/rocket/rocket_gem.c       | 2 ++
>  drivers/gpu/drm/panfrost/panfrost_drv.c | 2 ++
>  2 files changed, 4 insertions(+)
> 

Both patches pushed to drm-misc-fixes.

Thanks,
Steve