From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: <dri-devel@lists.freedesktop.org>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Dave Airlie <airlied@gmail.com>, <stable@vger.kernel.org>,
Benoit Parrot <bparrot@ti.com>
Subject: Re: [PATCH] drm: fix use of freed memory in drm_mode_setcrtc
Date: Mon, 17 Sep 2018 17:51:27 +0300 [thread overview]
Message-ID: <18588590-0bbc-34e3-af97-690464298260@ti.com> (raw)
In-Reply-To: <20180917144150.GN5565@intel.com>
On 17/09/18 17:41, Ville Syrjälä wrote:
> On Mon, Sep 17, 2018 at 02:00:54PM +0300, Tomi Valkeinen wrote:
>> drm_mode_setcrtc() retries modesetting in case one of the functions it
>> calls returns -EDEADLK. connector_set, mode and fb are freed before
>> retrying, but they are not set to NULL. This can cause
>> drm_mode_setcrtc() to use those variables.
>>
>> For example: On the first try __drm_mode_set_config_internal() returns
>> -EDEADLK. connector_set, mode and fb are freed. Next retry starts, and
>> drm_modeset_lock_all_ctx() returns -EDEADLK, and we jump to 'out'. The
>> code will happily try to release all three again.
>
> This thing uses lock_all() so I guess the EDEADLK must be coming from
> some private locks in the driver?
Yes, I've seen this cause issues only with Benoit's work-in-progress
omapdrm patches.
> Anyways, patch looks good so
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Thanks!
Tomi
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
next prev parent reply other threads:[~2018-09-17 20:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-17 11:00 [PATCH] drm: fix use of freed memory in drm_mode_setcrtc Tomi Valkeinen
2018-09-17 14:41 ` Ville Syrjälä
2018-09-17 14:51 ` Tomi Valkeinen [this message]
2018-09-21 8:55 ` Daniel Vetter
2018-09-26 9:39 ` Tomi Valkeinen
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=18588590-0bbc-34e3-af97-690464298260@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=airlied@gmail.com \
--cc=bparrot@ti.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=stable@vger.kernel.org \
--cc=ville.syrjala@linux.intel.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