> > In filemap_map_pages() > > CPU0 CPU1 > > trylock_page at offset_A trylock_page at offset_A > > goto offset_A+1 > > if (!fe->pte) { > > alloc pte > > map pte > > lock pte > > } > > handle offset_A with ptl held handle offset_A+1 without acquiring ptl > > I still don't see where's the problem. > > On the seond iteration (for offset_A+1), CPU1 would go into > alloc_set_pte() and as its fe->pte is NULL pte_alloc_one_map() would map > and lock the pte table allocated by CPU0. > Ah, you are right. I missed the 2nd fe! thanks Hillf -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>