diff options
author | 2014-11-19 18:38:08 +0100 | |
---|---|---|
committer | 2014-11-20 11:35:20 +1000 | |
commit | f52b69f1ecfdd7ef6867a257620258c09e569552 (patch) | |
tree | 743137d6d11bd5a9ed8bba2484de30c5f630944c /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | drm/atomic: Only destroy connector states with connection mutex held (diff) | |
download | linux-dev-f52b69f1ecfdd7ef6867a257620258c09e569552.tar.xz linux-dev-f52b69f1ecfdd7ef6867a257620258c09e569552.zip |
drm/atomic: Don't overrun the connector array when hotplugging
Yet another fallout from not considering DP MST hotplug. With the
previous patches we have stable indices, but it might still happen
that a connector gets added between when we allocate the array and
when we actually add a connector. Especially when we back off due to
ww mutex contention or similar issues.
So store the sizes of the arrays in struct drm_atomic_state and double
check them. We don't really care about races except that we want to
use a consistent value, so ACCESS_ONCE is all we need. And if we
indeed notice that we'd overrun the array then just give up and
restart the entire ioctl.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions