Re: [PATCH v4 2/9] mm: pagewalk: Take the pagetable lock in walk_pte_range()

2019-10-09 Thread Linus Torvalds
On Wed, Oct 9, 2019 at 8:14 AM Kirill A. Shutemov wrote: > > If ->pte_entry() fails on the first entry of the page table, pte - 1 will > point out side the page table. > > And the '- 1' is totally unnecessary as we break the loop before pte++ on > the last iteration. Good catch. Too much copying

Re: [PATCH v4 2/9] mm: pagewalk: Take the pagetable lock in walk_pte_range()

2019-10-09 Thread Kirill A. Shutemov
On Tue, Oct 08, 2019 at 11:15:01AM +0200, Thomas Hellström (VMware) wrote: > From: Thomas Hellstrom > > Without the lock, anybody modifying a pte from within this function might > have it concurrently modified by someone else. > > Cc: Matthew Wilcox > Cc: Will Deacon > Cc: Peter Zijlstra >

[PATCH v4 2/9] mm: pagewalk: Take the pagetable lock in walk_pte_range()

2019-10-08 Thread VMware
From: Thomas Hellstrom Without the lock, anybody modifying a pte from within this function might have it concurrently modified by someone else. Cc: Matthew Wilcox Cc: Will Deacon Cc: Peter Zijlstra Cc: Rik van Riel Cc: Minchan Kim Cc: Michal Hocko Cc: Huang Ying Cc: Jérôme Glisse Cc: