An error occurred while fetching folder content.
mm/ksm.c: fix inconsistent accounting of zero pages
Claudio Imbrenda authored
When using KSM with use_zero_pages, we replace anonymous pages
containing only zeroes with actual zero pages, which are not anonymous.
We need to do proper accounting of the mm counters, otherwise we will
get wrong values in /proc and a BUG message in dmesg when tearing down
the mm.

Link: http://lkml.kernel.org/r/1522931274-15552-1-git-send-email-imbrenda@linux.vnet.ibm.com
Fixes: e86c59b1

 ("mm/ksm: improve deduplication of zero pages with colouring")
Signed-off-by: default avatarClaudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
a38c015f
Name Last commit Last update
..
kasan slab, slub: skip unnecessary kasan_cache_shutdown()
Kconfig treewide: simplify Kconfig dependencies for removed archs
Kconfig.debug kmemcheck: rip it out
Makefile mm/swap_slots.c: use conditional compilation
backing-dev.c mm/vmscan: don't mess with pgdat->flags in memcg reclaim
balloon_compaction.c virtio_balloon: fix deadlock on OOM
bootmem.c mm: docs: fix parameter names mismatch
cleancache.c fs: switch ->s_uuid to uuid_t
cma.c headers: untangle kmemleak.h from mm.h
cma.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license
cma_debug.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license
compaction.c mm: kernel-doc: add missing parameter descriptions
debug.c mm/debug.c: provide useful debugging information for VM_BUG
debug_page_ref.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license
dmapool.c lib/vsprintf.c: remove %Z support
early_ioremap.c mm/early_ioremap: Fix boot hang with earlyprintk=efi,keep
fadvise.c mm: add ksys_fadvise64_64() helper; remove in-kernel call to sys_fadvise64_64()
failslab.c mm: make should_failslab always available for fault injection
filemap.c mm/filemap.c: remove include of hardirq.h
frame_vector.c mm/frame_vector.c: release a semaphore in 'get_vaddr_frames()'
frontswap.c mm, frontswap: convert frontswap_enabled to static key
gup.c mm/gup.c: fix coding style issues.
gup_benchmark.c mm: add infrastructure for get_user_pages_fast() benchmarking
highmem.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license
hmm.c mm/hmm.c: remove superfluous RCU protection around radix tree lookup
huge_memory.c
hugetlb.c
hugetlb_cgroup.c
hwpoison-inject.c
init-mm.c
internal.h
interval_tree.c
khugepaged.c
kmemleak-test.c
kmemleak.c
ksm.c
list_lru.c
maccess.c
madvise.c
memblock.c
memcontrol.c
memory-failure.c
memory.c
memory_hotplug.c
mempolicy.c
mempool.c
memtest.c
migrate.c
mincore.c
mlock.c
mm_init.c
mmap.c
mmu_context.c
mmu_notifier.c
mmzone.c
mprotect.c
mremap.c
msync.c
nobootmem.c
nommu.c
oom_kill.c
page-writeback.c
page_alloc.c
page_counter.c
page_ext.c
page_idle.c
page_io.c
page_isolation.c
page_owner.c
page_poison.c
page_vma_mapped.c
pagewalk.c
percpu-internal.h
percpu-km.c
percpu-stats.c
percpu-vm.c
percpu.c
pgtable-generic.c
process_vm_access.c
quicklist.c
readahead.c
rmap.c
rodata_test.c
shmem.c
slab.c
slab.h
slab_common.c
slob.c
slub.c
sparse-vmemmap.c
sparse.c
swap.c
swap_cgroup.c
swap_slots.c
swap_state.c
swapfile.c
truncate.c
usercopy.c
userfaultfd.c
util.c