lkml.org 
[lkml]   [2016]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mremap: move_ptes: check pte dirty after its removal
On Mon, Nov 28, 2016 at 07:06:39PM -0800, Linus Torvalds wrote:
> On Mon, Nov 28, 2016 at 6:57 PM, Aaron Lu <aaron.lu@intel.com> wrote:
> >
> > Here is a fix patch, sorry for the trouble.
>
> I don't think you tested this one.. You've now essentially reverted
> 5d1904204c99 entirely by making the new force_flush logic a no-op.

Right, I just did a build test.
Now I'm doing more tests, sorry for being careless.

Regards,
Aaron

>
> > + pmd = pmdp_huge_get_and_clear(mm, old_addr, old_pmd);
> > if (pmd_present(*old_pmd) && pmd_dirty(*old_pmd))
> > force_flush = true;
>
> You need to be testing "pmd", not "*old_pmd".
>
> Because now "*old_pmd" will be zeroes.
>
> > if (pte_present(*old_pte) && pte_dirty(*old_pte))
> > force_flush = true;
>
> Similarly here. You need to check "pte", not "*old_pte".
>
> Linus
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

\
 
 \ /
  Last update: 2016-11-29 04:23    [W:0.031 / U:0.828 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site