diff options
| author | Maíra Canal <mcanal@igalia.com> | 2026-05-31 17:18:55 -0300 |
|---|---|---|
| committer | Maíra Canal <mcanal@igalia.com> | 2026-06-04 11:37:28 -0300 |
| commit | 6bf7e2affc6e62da7add393d7f352d4040f5bc27 (patch) | |
| tree | 082266a14ef9280c016c36c3fc50c43585e61a8a /include/linux/stackprotector.h | |
| parent | 30252e6f71ba974ecf9cd8ce395b73b9900bc378 (diff) | |
drm/v3d: Fix global performance monitor reference counting
In the SET_GLOBAL ioctl, v3d_perfmon_find() bumps the reference count on
the perfmon it returns, but v3d_perfmon_set_global_ioctl() and
v3d_perfmon_delete() fail to release that reference on several paths:
1. v3d_perfmon_set_global_ioctl() leaks the reference on its error
paths.
2. CLEAR_GLOBAL leaks both the find reference and the reference
previously stashed in v3d->global_perfmon by the SET_GLOBAL ioctl
that configured it.
3. Destroying a perfmon that is the current global perfmon leaks the
reference stashed by the SET_GLOBAL ioctl.
Release each of these references explicitly.
Cc: stable@vger.kernel.org
Fixes: c6eabbab359c ("drm/v3d: Add DRM_IOCTL_V3D_PERFMON_SET_GLOBAL")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Link: https://patch.msgid.link/20260531-v3d-perfmon-lifetime-v2-1-60ed4485a203@igalia.com
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Diffstat (limited to 'include/linux/stackprotector.h')
0 files changed, 0 insertions, 0 deletions
