drm/meson: fix memory leak on ->hpd_notify callback
Subsystems (5)
PATCH 1/1 drm/meson: fix memory leak on ->hpd_notify callback
The EDID returned by drm_bridge_get_edid() needs to be freed.
---
UNTESTED
--- drivers/gpu/drm/meson/meson_encoder_hdmi.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/meson/meson_encoder_hdmi.c +2 -0
@@ -334,6 +334,8 @@ static void meson_encoder_hdmi_hpd_notify(struct drm_bridge *bridge,return ;cec_notifier_set_phys_addr_from_edid (encoder_hdmi->cec_notifier, edid); + +kfree (edid); }else cec_notifier_phys_addr_invalidate (encoder_hdmi->cec_notifier); }
Signature · 1 line
2.39.2
Quoted 27 lines · Jani Nikula
The EDID returned by
drm_bridge_get_edid()needs to be freed.Fixes 0af5e0b41110 ("drm/meson: encoder_hdmi: switch to bridge DRM_BRIDGE_ATTACH_NO_CONNECTOR")Cc Neil Armstrong <[email protected]>Cc Sam Ravnborg <[email protected]>Cc Martin Blumenstingl <[email protected]>Cc Neil Armstrong <[email protected]>Cc Kevin Hilman <[email protected]>Cc Jerome Brunet <[email protected]>Cc <[email protected]> # v5.17+Signed-off-by Jani Nikula <[email protected]>---
UNTESTED
--- drivers/gpu/drm/meson/meson_encoder_hdmi.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/meson/meson_encoder_hdmi.c +0
-0
drivers/gpu/drm/meson/meson_encoder_hdmi.c static void meson_encoder_hdmi_hpd_notify(struct drm_bridge *bridge, · line 341
Quoted 8 lines
drivers/gpu/drm/meson/meson_encoder_hdmi.c +2
-0@@ -334,6 +334,8 @@ static void meson_encoder_hdmi_hpd_notify(struct drm_bridge *bridge,return ;cec_notifier_set_phys_addr_from_edid (encoder_hdmi->cec_notifier, edid); + +kfree (edid); }else cec_notifier_phys_addr_invalidate (encoder_hdmi->cec_notifier); }
Quoted 30 lines · Neil Armstrong
Quoted 29 lines · Jani Nikula
The EDID returned by
drm_bridge_get_edid()needs to be freed.Fixes 0af5e0b41110 ("drm/meson: encoder_hdmi: switch to bridge DRM_BRIDGE_ATTACH_NO_CONNECTOR")Cc Neil Armstrong <[email protected]>Cc Sam Ravnborg <[email protected]>Cc Martin Blumenstingl <[email protected]>Cc Neil Armstrong <[email protected]>Cc Kevin Hilman <[email protected]>Cc Jerome Brunet <[email protected]>Cc <[email protected]> # v5.17+Signed-off-by Jani Nikula <[email protected]>---
UNTESTED
--- drivers/gpu/drm/meson/meson_encoder_hdmi.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/meson/meson_encoder_hdmi.c +0
-0@@ -334,6 +334,8 @@ static void meson_encoder_hdmi_hpd_notify(struct drm_bridge *bridge,return ;
Quoted 8 lines
drivers/gpu/drm/meson/meson_encoder_hdmi.c static void meson_encoder_hdmi_hpd_notify(struct drm_bridge *bridge, · line 341
Quoted 6 lines
drivers/gpu/drm/meson/meson_encoder_hdmi.c +2
-0cec_notifier_set_phys_addr_from_edid (encoder_hdmi->cec_notifier, edid); + +kfree (edid); }else cec_notifier_phys_addr_invalidate (encoder_hdmi->cec_notifier); }Reviewed-by Neil Armstrong <[email protected]>
Thanks. I don't seem to have a toolchain to get this to build... would you mind applying this, please?
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel
[email protected]
maintainerQuoted 40 lines · Jani Nikula
Quoted 30 lines · Neil Armstrong
Quoted 29 lines · Jani Nikula
The EDID returned by
drm_bridge_get_edid()needs to be freed.Fixes 0af5e0b41110 ("drm/meson: encoder_hdmi: switch to bridge DRM_BRIDGE_ATTACH_NO_CONNECTOR")Cc Neil Armstrong <[email protected]>Cc Sam Ravnborg <[email protected]>Cc Martin Blumenstingl <[email protected]>Cc Neil Armstrong <[email protected]>Cc Kevin Hilman <[email protected]>Cc Jerome Brunet <[email protected]>Cc <[email protected]> # v5.17+Signed-off-by Jani Nikula <[email protected]>---
UNTESTED
--- drivers/gpu/drm/meson/meson_encoder_hdmi.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/meson/meson_encoder_hdmi.c +0
-0@@ -334,6 +334,8 @@ static void meson_encoder_hdmi_hpd_notify(struct drm_bridge *bridge,return ;Quoted 8 lines
drivers/gpu/drm/meson/meson_encoder_hdmi.c static void meson_encoder_hdmi_hpd_notify(struct drm_bridge *bridge, · line 341
Quoted 6 lines
drivers/gpu/drm/meson/meson_encoder_hdmi.c +2
-0cec_notifier_set_phys_addr_from_edid (encoder_hdmi->cec_notifier, edid); + +kfree (edid); }else cec_notifier_phys_addr_invalidate (encoder_hdmi->cec_notifier); }Reviewed-by Neil Armstrong <[email protected]>
Quoted 2 lines
Thanks. I don't seem to have a toolchain to get this to build... would you mind applying this, please?
Sure I'll handle this.
Thanks,
Neil
Quoted 5 lines
BR,
Jani.
Hi,
Quoted 3 lines · Jani Nikula
The EDID returned by
drm_bridge_get_edid()needs to be freed.
Thanks, Applied to https://anongit.freedesktop.org/git/drm/drm-misc.git (drm-misc-fixes)
[1/1] drm/meson: fix memory leak on ->hpd_notify callback
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=099f0af9d98231bb74956ce92508e87cbcb896be
Signature · 1 line
Neil
Quoted 11 lines · Neil Armstrong
Hi,
Quoted 3 lines · Jani Nikula
The EDID returned by
drm_bridge_get_edid()needs to be freed.Thanks, Applied to https://anongit.freedesktop.org/git/drm/drm-misc.git (drm-misc-fixes)
[1/1] drm/meson: fix memory leak on ->hpd_notify callback
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=099f0af9d98231bb74956ce92508e87cbcb896be
Thanks,
Jani.
Signature · 1 line
Jani Nikula, Intel