WSL2-Linux-Kernel/mm
KAMEZAWA Hiroyuki ebb76ce16d memcg: fix wrong VM_BUG_ON() in try_charge()'s mm->owner check
At __mem_cgroup_try_charge(), VM_BUG_ON(!mm->owner) is checked.
But as commented in mem_cgroup_from_task(), mm->owner can be NULL
in some racy case. This check of VM_BUG_ON() is bad.

A possible story to hit this is at swapoff()->try_to_unuse(). It passes
mm_struct to mem_cgroup_try_charge_swapin() while mm->owner is NULL. If we
can't get proper mem_cgroup from swap_cgroup information, mm->owner is used
as charge target and we see NULL.

Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reported-by: Hugh Dickins <hughd@google.com>
Reported-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-12-30 10:07:06 -08:00
..
Kconfig
Kconfig.debug
Makefile
backing-dev.c
bootmem.c
bounce.c
compaction.c mm/compaction.c: avoid double mem_cgroup_del_lru() 2010-12-22 19:43:33 -08:00
debug-pagealloc.c
dmapool.c
fadvise.c
failslab.c
filemap.c Call the filesystem back whenever a page is removed from the page cache 2010-12-02 09:55:21 -05:00
filemap_xip.c
fremap.c
highmem.c mm,x86: fix kmap_atomic_push vs ioremap_32.c 2010-10-27 18:03:05 -07:00
hugetlb.c mm/hugetlb.c: avoid double unlock_page() in hugetlb_fault() 2010-12-02 14:51:14 -08:00
hwpoison-inject.c
init-mm.c
internal.h
kmemcheck.c
kmemleak-test.c
kmemleak.c
ksm.c ksm: annotate ksm_thread_mutex is no deadlock source 2010-12-02 14:51:15 -08:00
maccess.c
madvise.c
memblock.c
memcontrol.c memcg: fix wrong VM_BUG_ON() in try_charge()'s mm->owner check 2010-12-30 10:07:06 -08:00
memory-failure.c mem-hotplug: introduce {un}lock_memory_hotplug() 2010-12-02 14:51:15 -08:00
memory.c
memory_hotplug.c mem-hotplug: introduce {un}lock_memory_hotplug() 2010-12-02 14:51:15 -08:00
mempolicy.c mm/mempolicy.c: add rcu read lock to protect pid structure 2010-12-02 14:51:14 -08:00
mempool.c
migrate.c mm/migrate.c: fix compilation error 2010-12-22 19:43:34 -08:00
mincore.c
mlock.c
mm_init.c
mmap.c install_special_mapping skips security_file_mmap check. 2010-12-15 12:30:36 -08:00
mmu_context.c
mmu_notifier.c
mmzone.c
mprotect.c perf_events: Fix perf_counter_mmap() hook in mprotect() 2010-11-09 10:19:38 -08:00
mremap.c
msync.c
nommu.c nommu: Provide stubbed alloc/free_vm_area() implementation. 2010-12-24 12:08:30 +09:00
oom_kill.c
page-writeback.c writeback: do uninterruptible sleep in balance_dirty_pages() 2010-12-22 19:43:33 -08:00
page_alloc.c PM / Hibernate: Fix memory corruption related to swap 2010-12-06 23:52:08 +01:00
page_cgroup.c
page_io.c
page_isolation.c
pagewalk.c mm: remove call to find_vma in pagewalk for non-hugetlbfs 2010-11-25 06:50:46 +09:00
percpu-km.c
percpu-vm.c
percpu.c percpu: print out alloc information with KERN_DEBUG instead of KERN_INFO 2010-12-22 14:19:14 +01:00
prio_tree.c
quicklist.c
readahead.c
rmap.c
shmem.c convert get_sb_nodev() users 2010-10-29 04:16:31 -04:00
slab.c
slob.c
slub.c slub: Fix a crash during slabinfo -v 2010-12-04 09:53:49 +02:00
sparse-vmemmap.c
sparse.c
swap.c fuse: use release_pages() 2010-10-27 18:03:17 -07:00
swap_state.c
swapfile.c
thrash.c
truncate.c Call the filesystem back whenever a page is removed from the page cache 2010-12-02 09:55:21 -05:00
util.c
vmalloc.c vmalloc: eagerly clear ptes on vunmap 2010-12-02 14:51:15 -08:00
vmscan.c Call the filesystem back whenever a page is removed from the page cache 2010-12-02 09:55:21 -05:00
vmstat.c vmstat: fix dirty threshold ordering 2010-12-02 14:51:14 -08:00