From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: David Airlie <airlied@linux.ie>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/omap: Use after free in omap_connector_destroy()
Date: Mon, 01 Oct 2018 23:50:45 +0000 [thread overview]
Message-ID: <8319740.4GPcRUpbZa@avalon> (raw)
In-Reply-To: <20181001164505.GB29248@mwanda>
Hi Dan,
Thank you for the patch.
On Monday, 1 October 2018 19:45:05 EEST Dan Carpenter wrote:
> We can free "omap_connector" until the end of the function.
>
> Fixes: 949ea2ef3fed ("drm/omap: Don't call HPD registration operations
> recursively") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
This has already been fixed by https://www.spinics.net/lists/dri-devel/
msg190817.html.
> diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c
> b/drivers/gpu/drm/omapdrm/omap_connector.c index 98f5ca29444a..b81302c4bf9e
> 100644
> --- a/drivers/gpu/drm/omapdrm/omap_connector.c
> +++ b/drivers/gpu/drm/omapdrm/omap_connector.c
> @@ -164,10 +164,11 @@ static void omap_connector_destroy(struct
> drm_connector *connector)
>
> drm_connector_unregister(connector);
> drm_connector_cleanup(connector);
> - kfree(omap_connector);
>
> omapdss_device_put(omap_connector->output);
> omapdss_device_put(omap_connector->display);
> +
> + kfree(omap_connector);
> }
>
> #define MAX_EDID 512
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2018-10-01 23:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-01 16:45 [PATCH] drm/omap: Use after free in omap_connector_destroy() Dan Carpenter
2018-10-01 23:50 ` Laurent Pinchart [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8319740.4GPcRUpbZa@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=airlied@linux.ie \
--cc=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).