]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ttm: Fix potential ttm_mem_evict_first races.
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 2 Dec 2009 17:33:46 +0000 (18:33 +0100)
committerDave Airlie <airlied@redhat.com>
Wed, 16 Dec 2009 05:34:40 +0000 (15:34 +1000)
commit8e3a73d7e5cba608baf4f7eea43530ef8be93fdf
tree78136ca9c2fc00cd0550703fe07ae7ada55c11b9
parent564a721bbf8b1b853e4221673e993da98bf4dcb0
drm/ttm: Fix potential ttm_mem_evict_first races.

1) The function was previously called with a potentially empty
LRU list which would have lead to an OOPS or servere corruption.
2) In rare cases, after reservation has succeeded, another process may
already have evicted it or even pinned it. We must revalidate the
buffer status after releasing the lru lock.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/ttm/ttm_bo.c