* [PATCH] drm/tegra: output: Do not put OF node twice
@ 2020-11-13 20:41 Thierry Reding
2020-11-14 19:07 ` Sam Ravnborg
2020-11-15 7:55 ` Dmitry Osipenko
0 siblings, 2 replies; 3+ messages in thread
From: Thierry Reding @ 2020-11-13 20:41 UTC (permalink / raw)
To: Thierry Reding; +Cc: Dmitry Osipenko, dri-devel, linux-tegra
From: Thierry Reding <treding@nvidia.com>
The original patch for commit 3d2e7aec7013 ("drm/tegra: output: Don't
leak OF node on error") contained this hunk, but it was accidentally
dropped during conflict resolution. This causes use-after-free errors
on devices that use an I2C controller for HDMI DDC/CI on Tegra210 and
later.
Fixes: 3d2e7aec7013 ("drm/tegra: output: Don't leak OF node on error")
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
drivers/gpu/drm/tegra/output.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c
index 5a4fd0dbf4cf..47d26b5d9945 100644
--- a/drivers/gpu/drm/tegra/output.c
+++ b/drivers/gpu/drm/tegra/output.c
@@ -129,7 +129,6 @@ int tegra_output_probe(struct tegra_output *output)
if (!output->ddc) {
err = -EPROBE_DEFER;
- of_node_put(ddc);
return err;
}
}
--
2.29.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/tegra: output: Do not put OF node twice
2020-11-13 20:41 [PATCH] drm/tegra: output: Do not put OF node twice Thierry Reding
@ 2020-11-14 19:07 ` Sam Ravnborg
2020-11-15 7:55 ` Dmitry Osipenko
1 sibling, 0 replies; 3+ messages in thread
From: Sam Ravnborg @ 2020-11-14 19:07 UTC (permalink / raw)
To: Thierry Reding; +Cc: linux-tegra, Dmitry Osipenko, dri-devel
Hi Thierry,
On Fri, Nov 13, 2020 at 09:41:57PM +0100, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> The original patch for commit 3d2e7aec7013 ("drm/tegra: output: Don't
> leak OF node on error") contained this hunk, but it was accidentally
> dropped during conflict resolution. This causes use-after-free errors
> on devices that use an I2C controller for HDMI DDC/CI on Tegra210 and
> later.
>
> Fixes: 3d2e7aec7013 ("drm/tegra: output: Don't leak OF node on error")
> Signed-off-by: Thierry Reding <treding@nvidia.com>
Two times of_node_put() of the same pointer looks bad.
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/tegra: output: Do not put OF node twice
2020-11-13 20:41 [PATCH] drm/tegra: output: Do not put OF node twice Thierry Reding
2020-11-14 19:07 ` Sam Ravnborg
@ 2020-11-15 7:55 ` Dmitry Osipenko
1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Osipenko @ 2020-11-15 7:55 UTC (permalink / raw)
To: Thierry Reding; +Cc: dri-devel, linux-tegra
13.11.2020 23:41, Thierry Reding пишет:
> From: Thierry Reding <treding@nvidia.com>
>
> The original patch for commit 3d2e7aec7013 ("drm/tegra: output: Don't
> leak OF node on error") contained this hunk, but it was accidentally
> dropped during conflict resolution. This causes use-after-free errors
> on devices that use an I2C controller for HDMI DDC/CI on Tegra210 and
> later.
>
> Fixes: 3d2e7aec7013 ("drm/tegra: output: Don't leak OF node on error")
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> drivers/gpu/drm/tegra/output.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c
> index 5a4fd0dbf4cf..47d26b5d9945 100644
> --- a/drivers/gpu/drm/tegra/output.c
> +++ b/drivers/gpu/drm/tegra/output.c
> @@ -129,7 +129,6 @@ int tegra_output_probe(struct tegra_output *output)
>
> if (!output->ddc) {
> err = -EPROBE_DEFER;
> - of_node_put(ddc);
> return err;
> }
> }
>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-15 7:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-13 20:41 [PATCH] drm/tegra: output: Do not put OF node twice Thierry Reding
2020-11-14 19:07 ` Sam Ravnborg
2020-11-15 7:55 ` Dmitry Osipenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).