[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFx_vOfab=WNHd=OR7vng2V_UqrEdx_xZBsKv_ohE65f8w@mail.gmail.com>
Date: Mon, 28 Nov 2016 19:06:39 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Aaron Lu <aaron.lu@...el.com>
Cc: Linux Memory Management List <linux-mm@...ck.org>,
Dave Hansen <dave.hansen@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Huang Ying <ying.huang@...el.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mremap: move_ptes: check pte dirty after its removal
On Mon, Nov 28, 2016 at 6:57 PM, Aaron Lu <aaron.lu@...el.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.
> + 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
Powered by blists - more mailing lists