[PATCH] [ARM] Do not call flush_cache_user_range with mmap_sem held
dima at android.com
Tue May 4 00:07:03 EDT 2010
>> The point of this code is to first validate that the region we're working
>> on is valid. As soon as we drop the lock, we lose the guarantee that
>> the region is valid while we operate on it - indeed, the region could be
>> unmapped and remapped by a different thread.
> So what if it was remapped? The worst case scenario in this case is
> that we needlessly flush a region of memory, but its not "wrong". It
> can't be any worse than just doing a full cache flush. If another
> thread unmapped the region, then we should (and will) segfault the
> flushing thread, which is the correct behavior IMHO.
More information about the linux-arm-kernel