[lkml]   [2019]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v4 2/9] mm: pagewalk: Take the pagetable lock in walk_pte_range()
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 the wrong pattern from other sources.

I do wish we didn't have this pattern of "update pte, then do
pte_unmap as long as it's in the same page". Yeah, it avoids a
variable, but still... But it is what it is, and we just need to be


 \ /
  Last update: 2019-10-09 18:08    [W:0.074 / U:9.008 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site