WSL2-Linux-Kernel/mm
Linus Torvalds d0b51bfb23 Revert "mm: shmem: don't truncate page if memory failure happens"
This reverts commit b9d02f1bdd.

The error handling of that patch was fundamentally broken, and it needs
to be entirely re-done.

For example, in shmem_write_begin() it would call shmem_getpage(), then
ignore the error return from that, and look at the page pointer contents
instead.

And in shmem_read_mapping_page_gfp(), the patch tested PageHWPoison() on
a page pointer that two lines earlier had potentially been set as an
error pointer.

These issues could be individually fixed, but when it has this many
issues, I'm just reverting it instead of waiting for fixes.

Link: https://lore.kernel.org/linux-mm/20211111084617.6746-1-ajaygargnsit@gmail.com/
Reported-by: Ajay Garg <ajaygargnsit@gmail.com>
Reported-by: Jens Axboe <axboe@kernel.dk>
Cc: Yang Shi <shy828301@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-11-13 12:03:03 -08:00
..
damon mm/damon: remove return value from before_terminate callback 2021-11-06 13:30:46 -07:00
kasan kasan: add kasan mode messages when kasan init 2021-11-11 09:34:35 -08:00
kfence kfence: always use static branches to guard kfence_alloc() 2021-11-06 13:30:43 -07:00
Kconfig kernel/resource: disallow access to exclusive system RAM regions 2021-11-09 10:02:52 -08:00
Kconfig.debug
Makefile mm/util: Add folio_mapping() and folio_file_mapping() 2021-09-27 09:27:30 -04:00
backing-dev.c Merge branch 'akpm' (patches from Andrew) 2021-11-06 14:08:17 -07:00
balloon_compaction.c
bootmem_info.c
cleancache.c
cma.c memblock: rename memblock_free to memblock_phys_free 2021-11-06 13:30:41 -07:00
cma.h
cma_debug.c
cma_sysfs.c
compaction.c Merge branch 'akpm' (patches from Andrew) 2021-11-06 14:08:17 -07:00
debug.c Merge branch 'akpm' (patches from Andrew) 2021-11-06 14:08:17 -07:00
debug_page_ref.c
debug_vm_pgtable.c mm: debug_vm_pgtable: don't use __P000 directly 2021-11-06 13:30:33 -07:00
dmapool.c
early_ioremap.c
fadvise.c
failslab.c
filemap.c Merge branch 'akpm' (patches from Andrew) 2021-11-09 10:11:53 -08:00
folio-compat.c mm/filemap: Add FGP_STABLE 2021-10-18 07:49:41 -04:00
frontswap.c
gup.c Merge branch 'akpm' (patches from Andrew) 2021-11-06 14:08:17 -07:00
gup_test.c
gup_test.h
highmem.c Merge branch 'akpm' (patches from Andrew) 2021-11-06 14:08:17 -07:00
hmm.c mm/hmm: bypass devmap pte when all pfn requested flags are fulfilled 2021-09-08 18:45:52 -07:00
huge_memory.c Memory folios 2021-11-01 08:47:59 -07:00
hugetlb.c Merge branch 'akpm' (patches from Andrew) 2021-11-06 14:08:17 -07:00
hugetlb_cgroup.c hugetlb_cgroup: remove unused hugetlb_cgroup_from_counter macro 2021-11-06 13:30:39 -07:00
hugetlb_vmemmap.c
hugetlb_vmemmap.h
hwpoison-inject.c
init-mm.c
internal.h Merge branch 'akpm' (patches from Andrew) 2021-11-06 14:08:17 -07:00
interval_tree.c
io-mapping.c
ioremap.c
khugepaged.c Merge branch 'akpm' (patches from Andrew) 2021-11-06 14:08:17 -07:00
kmemleak.c mm/kmemleak: allow __GFP_NOLOCKDEP passed to kmemleak's gfp 2021-09-08 18:45:53 -07:00
ksm.c mm/migrate: Add folio_migrate_flags() 2021-10-18 07:49:39 -04:00
list_lru.c mm: list_lru: only add memcg-aware lrus to the global lru list 2021-11-06 13:30:35 -07:00
maccess.c
madvise.c mm: use pidfd_get_task() 2021-10-14 13:29:22 +02:00
mapping_dirty_helpers.c
memblock.c arm64 fixes for -rc1 2021-11-10 11:29:30 -08:00
memcontrol.c mm: unexport {,un}lock_page_memcg 2021-11-11 09:34:35 -08:00
memfd.c mm,hugetlb: remove mlock ulimit for SHM_HUGETLB 2021-11-09 10:02:48 -08:00
memory-failure.c Revert "mm: shmem: don't truncate page if memory failure happens" 2021-11-13 12:03:03 -08:00
memory.c Merge branch 'akpm' (patches from Andrew) 2021-11-06 14:08:17 -07:00
memory_hotplug.c mm/memory_hotplug: indicate MEMBLOCK_DRIVER_MANAGED with IORESOURCE_SYSRAM_DRIVER_MANAGED 2021-11-06 13:30:42 -07:00
mempolicy.c Merge branch 'akpm' (patches from Andrew) 2021-11-06 14:08:17 -07:00
mempool.c mm: remove spurious blkdev.h includes 2021-10-18 06:17:01 -06:00
memremap.c mm/memcg: Convert mem_cgroup_uncharge() to take a folio 2021-09-27 09:27:31 -04:00
memtest.c
migrate.c mm/migrate.c: remove MIGRATE_PFN_LOCKED 2021-11-11 09:34:35 -08:00
mincore.c
mlock.c mm/memcg: Add folio_lruvec_relock_irq() and folio_lruvec_relock_irqsave() 2021-09-27 09:27:31 -04:00
mm_init.c
mmap.c mm,hugetlb: remove mlock ulimit for SHM_HUGETLB 2021-11-09 10:02:48 -08:00
mmap_lock.c
mmu_gather.c
mmu_notifier.c
mmzone.c
mprotect.c mm/mprotect.c: avoid repeated assignment in do_mprotect_pkey() 2021-11-06 13:30:36 -07:00
mremap.c mm, hugepages: add mremap() support for hugepage backed vma 2021-11-06 13:30:39 -07:00
msync.c
nommu.c Merge branch 'akpm' (patches from Andrew) 2021-11-06 14:08:17 -07:00
oom_kill.c pidfd.v5.16 2021-11-10 16:02:08 -08:00
page-writeback.c folio: Add a function to get the host inode for a folio 2021-11-10 21:16:52 +00:00
page_alloc.c Merge branch 'akpm' (patches from Andrew) 2021-11-06 14:08:17 -07:00
page_counter.c
page_ext.c mm/page_ext.c: fix a comment 2021-11-06 13:30:34 -07:00
page_idle.c
page_io.c for-5.16/block-2021-10-29 2021-11-01 09:19:50 -07:00
page_isolation.c mm/page_isolation: guard against possible putback unisolated page 2021-11-06 13:30:40 -07:00
page_owner.c mm/page_owner.c: modify the type of argument "order" in some functions 2021-11-11 09:34:35 -08:00
page_poison.c
page_reporting.c
page_reporting.h
page_vma_mapped.c
pagewalk.c
percpu-internal.h
percpu-km.c
percpu-stats.c
percpu-vm.c
percpu.c memblock: use memblock_free for freeing virtual pointers 2021-11-06 13:30:41 -07:00
pgalloc-track.h
pgtable-generic.c
process_vm_access.c
ptdump.c
readahead.c Merge branch 'akpm' (patches from Andrew) 2021-11-06 14:08:17 -07:00
rmap.c Merge branch 'akpm' (patches from Andrew) 2021-11-06 14:08:17 -07:00
rodata_test.c
secretmem.c mm/secretmem: avoid letting secretmem_users drop to zero 2021-10-28 17:18:55 -07:00
shmem.c Revert "mm: shmem: don't truncate page if memory failure happens" 2021-11-13 12:03:03 -08:00
shuffle.c
shuffle.h
slab.c mm: remove HARDENED_USERCOPY_FALLBACK 2021-11-06 13:30:43 -07:00
slab.h
slab_common.c mm: remove HARDENED_USERCOPY_FALLBACK 2021-11-06 13:30:43 -07:00
slob.c
slub.c Merge branch 'akpm' (patches from Andrew) 2021-11-06 14:08:17 -07:00
sparse-vmemmap.c mm: remove redundant smp_wmb() 2021-11-06 13:30:36 -07:00
sparse.c memblock: use memblock_free for freeing virtual pointers 2021-11-06 13:30:41 -07:00
swap.c Merge branch 'akpm' (patches from Andrew) 2021-11-06 14:08:17 -07:00
swap_cgroup.c
swap_slots.c
swap_state.c mm/workingset: Convert workingset_refault() to take a folio 2021-10-18 07:49:40 -04:00
swapfile.c Merge branch 'akpm' (patches from Andrew) 2021-11-06 14:08:17 -07:00
truncate.c vfs: keep inodes with page cache off the inode shrinker LRU 2021-11-09 10:02:48 -08:00
usercopy.c
userfaultfd.c Revert "mm: shmem: don't truncate page if memory failure happens" 2021-11-13 12:03:03 -08:00
util.c mm/migrate: Add folio_migrate_copy() 2021-10-18 07:49:39 -04:00
vmacache.c
vmalloc.c mm/vmalloc: introduce alloc_pages_bulk_array_mempolicy to accelerate memory allocation 2021-11-06 13:30:37 -07:00
vmpressure.c mm/vmpressure: fix data-race with memcg->socket_pressure 2021-11-06 13:30:40 -07:00
vmscan.c Merge branch 'akpm' (patches from Andrew) 2021-11-09 10:11:53 -08:00
vmstat.c mm: vmstat.c: make extfrag_index show more pretty 2021-11-06 13:30:42 -07:00
workingset.c Merge branch 'akpm' (patches from Andrew) 2021-11-09 10:11:53 -08:00
z3fold.c
zbud.c
zpool.c
zsmalloc.c mm/zsmalloc.c: close race window between zs_pool_dec_isolated() and zs_unregister_migration() 2021-11-06 13:30:43 -07:00
zswap.c