]> git.baikalelectronics.ru Git - kernel.git/commit
AGP fix race condition between unmapping and freeing pages
authorDave Airlie <airlied@redhat.com>
Mon, 15 Oct 2007 00:19:16 +0000 (10:19 +1000)
committerDave Airlie <airlied@optimus.(none)>
Mon, 15 Oct 2007 00:32:15 +0000 (10:32 +1000)
commit8fe01b5477e1f5c16654ae9c9184fe1c8902611a
tree32963c9bf40f3e0871d4d549bb6c3cf13abbb24c
parent410d308e43c1f6ba866d0b4ebd5e74f68e72bbc2
AGP fix race condition between unmapping and freeing pages

With Andi's clflush fixup, we were getting hangs on server exit, flushing the
mappings after freeing each page helped.

This showed up a race condition where the pages after being freed could be
reused before the agp mappings had been flushed.  Flushing after each single
page is a bad thing for future drm work, so make the page destroy a two pass
unmapping all the pages, flushing the mappings, and then destroying the pages.

Signed-off-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/char/agp/agp.h
drivers/char/agp/ali-agp.c
drivers/char/agp/backend.c
drivers/char/agp/generic.c
drivers/char/agp/i460-agp.c
drivers/char/agp/intel-agp.c