2018-05-25-14-52 merged

Andrew Morton (2):
      mm-fix-race-between-kmem_cache-destroy-create-and-deactivate-v2-fix
      refactor-part-of-the-oom-report-in-dump_header-fix

Dan Williams (5):
      mm, devm_memremap_pages: mark devm_memremap_pages() EXPORT_SYMBOL_GPL
      mm, devm_memremap_pages: handle errors allocating final devres action
      mm, hmm: use devm semantics for hmm_devmem_{add, remove}
      mm, hmm: replace hmm_devmem_pages_create() with devm_memremap_pages()
      mm, hmm: mark hmm_devmem_{add, add_resource} EXPORT_SYMBOL_GPL

David Hildenbrand (2):
      kasan: free allocated shadow memory on MEM_CANCEL_ONLINE
      kasan: fix memory hotplug during boot

David Rientjes (1):
      mm, hugetlb_cgroup: suppress SIGBUS when hugetlb_cgroup charge fails

Davidlohr Bueso (2):
      Revert "ipc/shm: Fix shmat mmap nil-page protection"
      ipc/shm: fix shmat() nil address after round-down when remapping

Hugh Dickins (1):
      proc: fix smaps and meminfo alignment

Joe Perches (1):
      checkpatch: fix macro argument precedence test

Joonsoo Kim (1):
      Revert "mm/cma: manage the memory of the CMA area by using the ZONE_MOVABLE"

Mathieu Malaterre (1):
      init/main.c: include <linux/mem_encrypt.h>

Michal Hocko (3):
      Reverted "mm: distinguish VMalloc pages"
      mm, memory_hotplug: make has_unmovable_pages more robust
      mm: do not warn on offline nodes unless the specific node is explicitly requested

Mike Kravetz (1):
      MAINTAINERS: change hugetlbfs maintainer and update files

Mike Rapoport (1):
      userfaultfd: prevent non-cooperative events vs mcopy_atomic races

Randy Dunlap (1):
      zram: fix printk formats in zram_drv.c

Roman Gushchin (2):
      mm, memcg: propagate memory effective protection on setting memory.min/low
      mm, memcg: don't skip memory guarantee calculations

Shakeel Butt (3):
      mm: fix race between kmem_cache destroy, create and deactivate
      mm-fix-race-between-kmem_cache-destroy-create-and-deactivate-v2
      memcg: force charge kmem counter too

Souptick Joarder (1):
      mm/shmem.c: use new return type vm_fault_t

Tejun Heo (1):
      mm: memcg: allow lowering memory.swap.max below the current usage

Vlastimil Babka (1):
      mm, page_alloc: do not break __GFP_THISNODE by zonelist reset

nixiaoming (1):
      scripts: fix printf format mismatch

yuzhoujian (1):
      mm: oom-kill, memcg: refactor part of the oom report in dump_header
Revert "mm/cma: manage the memory of the CMA area by using the ZONE_MOVABLE"

This reverts the following commits that change CMA design in MM.

 3d2054ad8c2d ("ARM: CMA: avoid double mapping to the CMA area if CONFIG_HIGHMEM=y")

 1d47a3ec09b5 ("mm/cma: remove ALLOC_CMA")

 bad8c6c0b114 ("mm/cma: manage the memory of the CMA area by using the ZONE_MOVABLE")

Ville reported a following error on i386.

  Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
  microcode: microcode updated early to revision 0x4, date = 2013-06-28
  Initializing CPU#0
  Initializing HighMem for node 0 (000377fe:00118000)
  Initializing Movable for node 0 (00000001:00118000)
  BUG: Bad page state in process swapper  pfn:377fe
  page:f53effc0 count:0 mapcount:-127 mapping:00000000 index:0x0
  flags: 0x80000000()
  raw: 80000000 00000000 00000000 ffffff80 00000000 00000100 00000200 00000001
  page dumped because: nonzero mapcount
  Modules linked in:
  CPU: 0 PID: 0 Comm: swapper Not tainted 4.17.0-rc5-elk+ #145
  Hardware name: Dell Inc. Latitude E5410/03VXMC, BIOS A15 07/11/2013
  Call Trace:
   dump_stack+0x60/0x96
   bad_page+0x9a/0x100
   free_pages_check_bad+0x3f/0x60
   free_pcppages_bulk+0x29d/0x5b0
   free_unref_page_commit+0x84/0xb0
   free_unref_page+0x3e/0x70
   __free_pages+0x1d/0x20
   free_highmem_page+0x19/0x40
   add_highpages_with_active_regions+0xab/0xeb
   set_highmem_pages_init+0x66/0x73
   mem_init+0x1b/0x1d7
   start_kernel+0x17a/0x363
   i386_start_kernel+0x95/0x99
   startup_32_smp+0x164/0x168

The reason for this error is that the span of MOVABLE_ZONE is extended
to whole node span for future CMA initialization, and, normal memory is
wrongly freed here.  I submitted the fix and it seems to work, but,
another problem happened.

It's so late time to fix the later problem so I decide to reverting the
series.

Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Laura Abbott <labbott@redhat.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit d883c6cf3b39f1f42506e82ad2779fb88004acf3)
7 files changed