Johannes Weiner
b8c8a338f7
Revert "vmalloc: back off when the current task is killed"
...
This reverts commits 5d17a73a2e ("vmalloc: back off when the current
task is killed") and 171012f561 ("mm: don't warn when vmalloc() fails
due to a fatal signal").
Commit 5d17a73a2e ("vmalloc: back off when the current task is
killed") made all vmalloc allocations from a signal-killed task fail.
We have seen crashes in the tty driver from this, where a killed task
exiting tries to switch back to N_TTY, fails n_tty_open because of the
vmalloc failing, and later crashes when dereferencing tty->disc_data.
Arguably, relying on a vmalloc() call to succeed in order to properly
exit a task is not the most robust way of doing things. There will be a
follow-up patch to the tty code to fall back to the N_NULL ldisc.
But the justification to make that vmalloc() call fail like this isn't
convincing, either. The patch mentions an OOM victim exhausting the
memory reserves and thus deadlocking the machine. But the OOM killer is
only one, improbable source of fatal signals. It doesn't make sense to
fail allocations preemptively with plenty of memory in most cases.
The patch doesn't mention real-life instances where vmalloc sites would
exhaust memory, which makes it sound more like a theoretical issue to
begin with. But just in case, the OOM access to memory reserves has
been restricted on the allocator side in cd04ae1e2d ("mm, oom: do not
rely on TIF_MEMDIE for memory reserves access"), which should take care
of any theoretical concerns on that front.
Revert this patch, and the follow-up that suppresses the allocation
warnings when we fail the allocations due to a signal.
Link: http://lkml.kernel.org/r/20171004185906.GB2136@cmpxchg.org
Fixes: 171012f561 ("mm: don't warn when vmalloc() fails due to a fatal signal")
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Alan Cox <alan@llwyncelyn.cymru>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-10-13 16:18:32 -07:00
..
kasan
Merge branch 'linus' into locking/core, to pick up fixes
2017-08-10 12:20:53 +02:00
backing-dev.c
mm/backing-dev.c: fix an error handling path in 'cgwb_create()'
2017-09-11 14:16:44 -06:00
balloon_compaction.c
mm/migrate: new migrate mode MIGRATE_SYNC_NO_COPY
2017-09-08 18:26:46 -07:00
bootmem.c
cleancache.c
cma.c
mm/cma.c: take __GFP_NOWARN into account in cma_alloc()
2017-10-13 16:18:32 -07:00
cma.h
cma_debug.c
mm/cma_debug.c: fix stack corruption due to sprintf usage
2017-08-18 15:32:02 -07:00
compaction.c
mm,compaction: serialize waitqueue_active() checks (for real)
2017-10-03 17:54:24 -07:00
debug.c
mm: make tlb_flush_pending global
2017-08-10 15:54:07 -07:00
debug_page_ref.c
dmapool.c
early_ioremap.c
x86/mm: Add support to access boot related data in the clear
2017-07-18 11:38:02 +02:00
fadvise.c
mm: fadvise: avoid fadvise for fs without backing device
2017-09-08 18:26:47 -07:00
failslab.c
filemap.c
mm: have filemap_check_and_advance_wb_err clear AS_EIO/AS_ENOSPC
2017-10-03 17:54:24 -07:00
frame_vector.c
frontswap.c
gup.c
mm/device-public-memory: device memory cache coherent with CPU
2017-09-08 18:26:46 -07:00
highmem.c
hmm.c
mm/hmm: avoid bloating arch that do not make use of HMM
2017-09-08 18:26:46 -07:00
huge_memory.c
mm: soft-dirty: keep soft-dirty bits over thp migration
2017-09-08 18:26:45 -07:00
hugetlb.c
powerpc updates for 4.14
2017-09-07 10:15:40 -07:00
hugetlb_cgroup.c
hwpoison-inject.c
init-mm.c
internal.h
mm, oom: do not rely on TIF_MEMDIE for memory reserves access
2017-09-06 17:27:30 -07:00
interval_tree.c
lib/interval_tree: fast overlap detection
2017-09-08 18:26:49 -07:00
Kconfig
mm/hmm: avoid bloating arch that do not make use of HMM
2017-09-08 18:26:46 -07:00
Kconfig.debug
khugepaged.c
kmemcheck.c
kmemleak-test.c
kmemleak.c
ksm.c
ksm: fix unlocked iteration over vmas in cmp_and_merge_page()
2017-10-03 17:54:23 -07:00
list_lru.c
mm: memcontrol: use vmalloc fallback for large kmem memcg arrays
2017-10-03 17:54:25 -07:00
maccess.c
madvise.c
mm/madvise.c: add description for MADV_WIPEONFORK and MADV_KEEPONFORK
2017-10-13 16:18:32 -07:00
Makefile
mm/hmm: avoid bloating arch that do not make use of HMM
2017-09-08 18:26:46 -07:00
memblock.c
mm/memblock.c: reversed logic in memblock_discard()
2017-08-25 16:12:46 -07:00
memcontrol.c
mm/memcg: avoid page count check for zone device
2017-10-03 17:54:24 -07:00
memory-failure.c
x86/mm, mm/hwpoison: Clear PRESENT bit for kernel 1:1 mappings of poison pages
2017-08-17 10:30:49 +02:00
memory.c
mm/device-public-memory: fix edge case in _vm_normal_page()
2017-10-03 17:54:25 -07:00
memory_hotplug.c
mm/memory_hotplug: define find_{smallest|biggest}_section_pfn as unsigned long
2017-10-03 17:54:26 -07:00
mempolicy.c
mm/mempolicy: fix NUMA_INTERLEAVE_HIT counter
2017-10-13 16:18:32 -07:00
mempool.c
memtest.c
migrate.c
mm/migrate: fix indexing bug (off by one) and avoid out of bound access
2017-10-13 16:18:32 -07:00
mincore.c
mlock.c
mm/mlock.c: use page_zone() instead of page_zone_id()
2017-09-08 18:26:47 -07:00
mm_init.c
mmap.c
lib/interval_tree: fast overlap detection
2017-09-08 18:26:49 -07:00
mmu_context.c
mmu_notifier.c
mm/mmu_notifier: kill invalidate_page
2017-08-31 16:13:00 -07:00
mmzone.c
mprotect.c
mm/ZONE_DEVICE: new type of ZONE_DEVICE for unaddressable memory
2017-09-08 18:26:46 -07:00
mremap.c
mm: thp: check pmd migration entry in common path
2017-09-08 18:26:45 -07:00
msync.c
nobootmem.c
mm: discard memblock data later
2017-08-18 15:32:01 -07:00
nommu.c
Merge branch 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2017-09-14 18:13:32 -07:00
oom_kill.c
mm, oom_reaper: skip mm structs with mmu notifiers
2017-10-03 17:54:24 -07:00
page-writeback.c
mm: rename global_page_state to global_zone_page_state
2017-09-06 17:27:29 -07:00
page_alloc.c
mm, page_alloc: add scheduling point to memmap_init_zone
2017-10-03 17:54:25 -07:00
page_counter.c
page_ext.c
mm, page_ext: periodically reschedule during page_ext_init()
2017-09-06 17:27:26 -07:00
page_idle.c
mm/page_idle.c: constify attribute_group structures
2017-09-06 17:27:27 -07:00
page_io.c
Merge branch 'for-4.14/block' of git://git.kernel.dk/linux-block
2017-09-07 11:59:42 -07:00
page_isolation.c
page_owner.c
mm, page_owner: skip unnecessary stack_trace entries
2017-09-13 18:53:16 -07:00
page_poison.c
page_vma_mapped.c
mm: remove unnecessary WARN_ONCE in page_vma_mapped_walk().
2017-10-13 16:18:32 -07:00
pagewalk.c
percpu-internal.h
percpu: skip chunks if the alloc does not fit in the contig hint
2017-07-26 17:41:05 -04:00
percpu-km.c
percpu: replace area map allocator with bitmap
2017-07-26 17:41:05 -04:00
percpu-stats.c
percpu: fix starting offset for chunk statistics traversal
2017-09-27 14:45:57 -07:00
percpu-vm.c
percpu.c
percpu: fix iteration to prevent skipping over block
2017-09-28 07:39:27 -07:00
pgtable-generic.c
mm: thp: enable thp migration in generic path
2017-09-08 18:26:45 -07:00
process_vm_access.c
quicklist.c
readahead.c
rmap.c
lib/interval_tree: fast overlap detection
2017-09-08 18:26:49 -07:00
rodata_test.c
mm: fix RODATA_TEST failure "rodata_test: test data was not read only"
2017-10-03 17:54:24 -07:00
shmem.c
mm: treewide: remove GFP_TEMPORARY allocation flag
2017-09-13 18:53:16 -07:00
slab.c
slab.h
locking/lockdep: Rework FS_RECLAIM annotation
2017-08-10 12:29:03 +02:00
slab_common.c
mm: memcontrol: use vmalloc fallback for large kmem memcg arrays
2017-10-03 17:54:25 -07:00
slob.c
locking/lockdep: Rework FS_RECLAIM annotation
2017-08-10 12:29:03 +02:00
slub.c
mm: treewide: remove GFP_TEMPORARY allocation flag
2017-09-13 18:53:16 -07:00
sparse-vmemmap.c
mm, sparse, page_ext: drop ugly N_HIGH_MEMORY branches for allocations
2017-09-06 17:27:26 -07:00
sparse.c
mm/sparse.c: fix typo in online_mem_sections
2017-09-08 18:26:47 -07:00
swap.c
mm: avoid marking swap cached page as lazyfree
2017-10-03 17:54:24 -07:00
swap_cgroup.c
swap_slots.c
mm/swap_slots.c: don't disable preemption while taking the per-CPU cache
2017-07-10 16:32:32 -07:00
swap_state.c
mm: fix data corruption caused by lazyfree page
2017-10-03 17:54:25 -07:00
swapfile.c
mm/swapfile.c: fix swapon frontswap_map memory leak on error
2017-09-08 18:26:47 -07:00
truncate.c
mm/truncate.c: fix THP handling in invalidate_mapping_pages()
2017-07-10 16:32:32 -07:00
usercopy.c
userfaultfd.c
userfaultfd: shmem: wire up shmem_mfill_zeropage_pte
2017-09-06 17:27:28 -07:00
util.c
mm: rename global_page_state to global_zone_page_state
2017-09-06 17:27:29 -07:00
vmacache.c
vmalloc.c
Revert "vmalloc: back off when the current task is killed"
2017-10-13 16:18:32 -07:00
vmpressure.c
vmscan.c
mm, THP, swap: add THP swapping out fallback counting
2017-09-06 17:27:28 -07:00
vmstat.c
mm: consider the number in local CPUs when reading NUMA stats
2017-09-08 18:26:47 -07:00
workingset.c
z3fold.c
z3fold: fix stale list handling
2017-10-03 17:54:24 -07:00
zbud.c
zpool.c
zsmalloc.c
mm/zsmalloc.c: change stat type parameter to int
2017-09-08 18:26:47 -07:00
zswap.c