On Thu, Jul 10, 2014 at 10:21:44AM +0100, Chris Wilson wrote: > Jerome Glisse pointed out that get_user_pages() does not synchronize > with concurrent invalidations of the VMA. As such if the backing vma is > changed whilst the pages for the object are being grabbed for use by the > GPU, we may end up with a random mixture of page references being held. > Worse still as the mmu-notifier will believe that the VMA invalidation > was complete and the old page references dropped. > > In order to serialise gup with mmu-notifier, we use a seqlock to detect > when an invalidation has occurred in parallel to our gup and if so cancel > the gup. The detection is a little coarse, but hopefully we never see > contention here! Hmm. This is bogus. I thought the gup_fast path was racy, but is serialised correctly with invalidate-range. -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx