Skip to content
Commit 5ea6f1c3 authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Maarten Lankhorst
Browse files

nouveau: make nouveau importing global buffers completely thread-safe, with tests



While I've closed off most races in a previous patch, a small race still existed
where importing then unreffing cound cause an invalid bo. Add a test for this case.

Racing sequence fixed:

- thread 1 releases bo, refcount drops to zero, blocks on acquiring nvdev->lock.
- thread 2 increases refcount to 1.
- thread 2 decreases refcount to zero, blocks on acquiring nvdev->lock.

At this point the 2 threads will clean up the same bo.

Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@ubuntu.com>
Reviewed-By: default avatarEmil Velikov <emil.l.velikov@gmail.com>
parent 7caa442e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment