diff options
author | Maarten Lankhorst <m.b.lankhorst@gmail.com> | 2012-11-28 06:25:43 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-12-10 05:21:22 -0500 |
commit | e7ab20197be3ee5fd75441e1cff0c7cdfea5bf1a (patch) | |
tree | 7c43fd066b4fd7f4aef8a4fb7b1d3c47d831c422 /Documentation/devicetree/bindings/tty/serial/fsl-mxs-auart.txt | |
parent | 2b7b3ad2fb8f904ae9ba7ca71323bc11c0978d91 (diff) |
drm/ttm: cope with reserved buffers on lru list in ttm_mem_evict_first, v2
Replace the goto loop with a simple for each loop, and only run the
delayed destroy cleanup if we can reserve the buffer first.
No race occurs, since lru lock is never dropped any more. An empty list
and a list full of unreservable buffers both cause -EBUSY to be returned,
which is identical to the previous situation, because previously buffers
on the lru list were always guaranteed to be reservable.
This should work since currently ttm guarantees items on the lru are
always reservable, and reserving items blockingly with some bo held
are enough to cause you to run into a deadlock.
Currently this is not a concern since removal off the lru list and
reservations are always done with atomically, but when this guarantee
no longer holds, we have to handle this situation or end up with
possible deadlocks.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'Documentation/devicetree/bindings/tty/serial/fsl-mxs-auart.txt')
0 files changed, 0 insertions, 0 deletions