diff options
author | Oleksandr Andrushchenko <[email protected]> | 2018-05-22 17:13:04 +0300 |
---|---|---|
committer | Oleksandr Andrushchenko <[email protected]> | 2018-05-31 10:36:28 +0300 |
commit | 069035c5db3459b9b5f12caf3bffed9a863fa5c4 (patch) | |
tree | f32b505ef20d1e6dba33220a5681fd71b330344d /tools/perf/scripts/python/call-graph-from-sql.py | |
parent | fbecef131676c1d18e8e6b42c04e10dc49725e96 (diff) |
drm: Fix possible race conditions while unplugging DRM device
When unplugging a hotpluggable DRM device we first unregister it
with drm_dev_unregister and then set drm_device.unplugged flag which
is used to mark device critical sections with drm_dev_enter()/
drm_dev_exit() preventing access to device resources that are not
available after the device is gone.
But drm_dev_unregister may lead to hotplug uevent(s) fired to
user-space on card and/or connector removal, thus making it possible
for user-space to try accessing a disconnected device.
Fix this by first making sure device is properly marked as
disconnected and only then unregister it.
Fixes: bee330f3d672 ("drm: Use srcu to protect drm_device.unplugged")
Signed-off-by: Oleksandr Andrushchenko <[email protected]>
Reported-by: Andrii Chepurnyi <[email protected]>
Cc: "Noralf Trønnes" <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions