Re: [PATCH] mm: fix potential pte_unmap_unlock pte error

From: osalvador
Date: Fri Oct 16 2020 - 08:37:12 EST


On 2020-10-16 14:31, Michal Hocko wrote:
I do not like the fix though. The code is really confusing. Why should
we check for flags in each iteration of the loop when it cannot change?
Also why should we take the ptl lock in the first place when the look is
broken out immediately?

About checking the flags:

https://lore.kernel.org/linux-mm/20190320081643.3c4m5tec5vx653sn@xxxxxxxxxxxx/#t