diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 2fc6d6c482387ed35a735746bf4580d3d38e68da..e44fb0fbb80e0890923385d3e97aff8dfa9d9a1b 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -932,7 +932,7 @@ static int __mem_cgroup_try_charge(struct mm_struct *mm, if (unlikely(!mem)) return 0; - VM_BUG_ON(mem_cgroup_is_obsolete(mem)); + VM_BUG_ON(!mem || mem_cgroup_is_obsolete(mem)); while (1) { int ret;