aboutsummaryrefslogtreecommitdiff
path: root/lib/timerqueue.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <[email protected]>2017-06-21 13:00:07 +0200
committerMaarten Lankhorst <[email protected]>2017-07-17 16:32:43 +0200
commiteb42ea6d0b8ed9ca8e73cc24fa801f0d8ab28905 (patch)
tree7ce017ebaa327a35fc70f34ae38122bd74fc7658 /lib/timerqueue.c
parentec878c0756a0c202e86256dca1de307ab1189ab8 (diff)
drm/crc: Handle opening and closing crc better
When I was doing a grep . -r /sys/kernel/debug/dri/0 I noticed a WARN appearing when I aborted the grep with ^C. After investigating I've also noticed that the error handling was lacking and there are race conditions involving multiple calls to open/close simultaneously. Fix this by setting the opened flag first and using crc->entries to decide when crc can be collected. Also call unset crc source before cleaning up, this way there is no race with a future open(). This patch has been tested with all the tests in igt with CRC in their name. Signed-off-by: Maarten Lankhorst <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Tomeu Vizoso <[email protected]> [mlankhorst: Add description that this patch has been tested with IGT, based on tomeu's feedback]
Diffstat (limited to 'lib/timerqueue.c')
0 files changed, 0 insertions, 0 deletions