Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromtorvalds/linux

Commit5b7abea

Browse files
kiryltorvalds
authored andcommitted
thp: fix MADV_DONTNEED vs clear soft dirty race
Yet another instance of the same race.Fix is identical to change_huge_pmd().See "thp: fix MADV_DONTNEED vs. numa balancing race" for more details.Link:http://lkml.kernel.org/r/20170302151034.27829-5-kirill.shutemov@linux.intel.comSigned-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>Cc: Andrea Arcangeli <aarcange@redhat.com>Cc: Hillf Danton <hillf.zj@alibaba-inc.com>Cc: <stable@vger.kernel.org>Signed-off-by: Andrew Morton <akpm@linux-foundation.org>Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent58ceeb6 commit5b7abea

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎fs/proc/task_mmu.c‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,14 @@ static inline void clear_soft_dirty(struct vm_area_struct *vma,
900900
staticinlinevoidclear_soft_dirty_pmd(structvm_area_struct*vma,
901901
unsigned longaddr,pmd_t*pmdp)
902902
{
903-
pmd_tpmd=pmdp_huge_get_and_clear(vma->vm_mm,addr,pmdp);
903+
pmd_tpmd=*pmdp;
904+
905+
/* See comment in change_huge_pmd() */
906+
pmdp_invalidate(vma,addr,pmdp);
907+
if (pmd_dirty(*pmdp))
908+
pmd=pmd_mkdirty(pmd);
909+
if (pmd_young(*pmdp))
910+
pmd=pmd_mkyoung(pmd);
904911

905912
pmd=pmd_wrprotect(pmd);
906913
pmd=pmd_clear_soft_dirty(pmd);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp