[PATCH 2/2] drm/mst: update the link_address_sent before sending the link address (v2)

Dave Airlie airlied at gmail.com
Wed Sep 30 18:48:27 PDT 2015


On 30 September 2015 at 17:44, Daniel Vetter <daniel at ffwll.ch> wrote:
> On Sun, Sep 06, 2015 at 06:53:00PM +1000, Dave Airlie wrote:
>> There is a race where the reply could get processed by another
>> work queue before we've updated the state.
>>
>> Update the state before sending the msg to close it.
>>
>> v2: reset value if return indicates we haven't send the msg.
>>
>> Pointed out by Adam J Richter on
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91481
>> Signed-off-by: Dave Airlie <airlied at redhat.com>
>
> Ok we see to have two callers of drm_dp_send_link_address:
> - drm_dp_add_port, but the only caller of that in turn is again
>   drm_dp_send_link_address. This is just self-recursion.
> - drm_dp_check_and_send_link_address, which in turn is called only by
>   itself and by drm_dp_mst_link_probe_work.
>
> drm_dp_mst_link_probe_work is only called from the mgr->work function, and
> a single work item is never run concurrently.
>
> I don't see any race here at all. A good cleanup though would be what
> Adam's original patch has done and move the link_address_sent = true into
> drm_dp_send_link_address.

I think we were being paranoid about the work queue vs the send_link_address
if you can't have multiple then it matters not.

But I'll repost the cleaned up version as it makes things easier to grok.

Dave.


More information about the dri-devel mailing list