]> git.baikalelectronics.ru Git - kernel.git/commit
mm: softdirty: keep bit when zapping file pte
authorPeter Feiner <pfeiner@google.com>
Thu, 25 Sep 2014 23:05:29 +0000 (16:05 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 26 Sep 2014 15:10:35 +0000 (08:10 -0700)
commit47552ca109ca65c5191beb364b970635b16aaaac
treec25bb32ce0501315b98ce6f8838732639cedc14a
parent4ba9f7e2b95181980265aa2333e8f3b0101b9325
mm: softdirty: keep bit when zapping file pte

This fixes the same bug as c5b8129a7c26 ("mm: softdirty: don't forget to
save file map softdiry bit on unmap") and a005c90d2271 ("mm/memory.c:
don't forget to set softdirty on file mapped fault") where the return
value of pte_*mksoft_dirty was being ignored.

To be sure that no other pte/pmd "mk" function return values were being
ignored, I annotated the functions in arch/x86/include/asm/pgtable.h
with __must_check and rebuilt.

The userspace effect of this bug is that the softdirty mark might be
lost if a file mapped pte get zapped.

Signed-off-by: Peter Feiner <pfeiner@google.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Jamie Liu <jamieliu@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: <stable@vger.kernel.org> [3.12+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory.c