Files
Linux/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 <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Reported-by: Hugh Dickins <[email protected]>
Reported-by: Thomas Meyer <[email protected]>
Signed-off-by: KAMEZAWA Hiroyuki <[email protected]>
Reviewed-by: Balbir Singh <[email protected]>
Signed-off-by: Hugh Dickins <[email protected]>
Cc: [email protected]
Signed-off-by: Linus Torvalds <[email protected]>
2010-12-30 10:07:06 -08:00
..
…
…
…
2010-12-22 19:43:34 -08:00
…
2010-09-09 09:05:06 -07:00
…
2010-10-26 16:52:08 -07:00
…
…
2010-10-26 16:52:10 -07:00
2010-10-29 04:16:31 -04:00
2010-12-04 09:53:49 +02:00
…
2010-10-27 18:03:17 -07:00
2010-10-26 16:52:11 -07:00
…
2010-10-24 10:51:24 +02:00
2010-12-02 14:51:14 -08:00