summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-record
diff options
context:
space:
mode:
authorAlbert Esteve <aesteve@redhat.com>2026-07-17 16:02:07 +0200
committerNeil Armstrong <neil.armstrong@linaro.org>2026-07-20 15:08:08 +0200
commitac3baea883dab989178dd4186090d6bcf52b8d55 (patch)
treec1e7b2784da843c86f04bdfc4db3d6545209d196 /tools/perf/scripts/python/bin/stackcollapse-record
parentb71a623598d319cae2acd9df1b297cc948c58bc7 (diff)
drm/panel: find_panel_by_fwnode() return a counted reference
find_panel_by_fwnode() is the fwnode-based counterpart to of_drm_find_panel(), used internally by drm_panel_add_follower(). Like of_drm_find_panel(), it returned an unrefcounted pointer, leaving a window where the panel could be freed between the lookup and first use. drm_panel_add_follower() worked around the missing panel kref by calling get_device() on the panel's underlying struct device. However, get_device() only prevents the device kobject from being freed. It does not prevent the panel's kzalloc()'d container memory from being released when the kref reaches zero. Apply the same fix: call drm_panel_get() under panel_lock before returning. Since find_panel_by_fwnode() now transfers a counted reference to drm_panel_add_follower(), drm_panel_remove_follower() must balance it with a matching drm_panel_put(). Acked-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Albert Esteve <aesteve@redhat.com> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20260717-drm_refcount_wiring-v3-4-023900c32e01@redhat.com
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions