diff options
author | 2025-04-03 12:47:38 +0200 | |
---|---|---|
committer | 2025-05-14 23:06:24 +0000 | |
commit | 80805b62ea5b95eda54c225b989f929ca0691ab0 (patch) | |
tree | b0d0b86228791ce9ecda2881134fdf1e46ba1118 /scripts/gdb/linux/utils.py | |
parent | drm/mediatek: mtk_drm_drv: Fix kobject put for mtk_mutex device ptr (diff) | |
download | linux-rng-80805b62ea5b95eda54c225b989f929ca0691ab0.tar.xz linux-rng-80805b62ea5b95eda54c225b989f929ca0691ab0.zip |
drm/mediatek: Fix kobject put for component sub-drivers
In function mtk_drm_get_all_drm_priv(), this driver is incrementing
the refcount for the sub-drivers of mediatek-drm with a call to
device_find_child() when taking a reference to all of those child
devices.
When the component bind fails multiple times this results in a
refcount_t overflow, as the reference count is never decremented:
fix that by adding a call to put_device() for all of the mmsys
devices in a loop, in error cases of mtk_drm_bind() and in the
mtk_drm_unbind() callback.
Fixes: 1ef7ed48356c ("drm/mediatek: Modify mediatek-drm for mt8195 multi mmsys support")
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20250403104741.71045-3-angelogioacchino.delregno@collabora.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions