title: is red black tree in kernel not protected?
body: <p>In Linux kernel, to store the memory regions of a process, Linux uses both a linked list and a red-black tree. <a href="http://lxr.free-electrons.com/source/mm/mmap.c?v=2.4.37#L681" rel="nofollow">find_vma</a> is a function which locates the first memory region whose vm_end field is greater than the passed address through red black tree. However, I find it there is has no protection (like a lock) for the red black tree inside find_vma(). What if another thread calls <a href="http://lxr.free-electrons.com/source/lib/rbtree.c?v=2.4.37#L223" rel="nofollow">rb_erase</a> function to delete some element on the tree at the same?</p>