expand_stack: small race
expand_stack is only protected with down_read(&mmap_sem), and thus 2 thread could grow a vma at the same time.
I think the spin_lock(&page_table_lock) should be moved up before the calculation of grow.
And map_user_kiobuf() doesn't honor VM_LOCKED for VM_GROWSDOWN segments. Probably it should be switched to find_extend_vma instead of the do-it-yourself implementation.
--
Manfred