It's legitimate. That change was supposed to be a no-op.
Thanks for reporting.
(is it not a bit weird from a namin POV that we have
mem_container_charge(page, mm) and mem_container_uncharge_page(page)?)
Seems to me that there's a missing pte_unmap_lock() in insert_page().
Also, a hunk in do_anonymous_page() is indented one tabstop too far, which
makes me suspect that patch(1) might have put it in the wrong place.
Balbir, can you please check that?
diff -puN mm/memory.c~memory-controller-memory-accounting-v7-fix mm/memory.c
--- a/mm/memory.c~memory-controller-memory-accounting-v7-fix
+++ a/mm/memory.c
@@ -1135,7 +1135,7 @@ static int insert_page(struct mm_struct
{
int retval;
pte_t *pte;
- spinlock_t *ptl;
+ spinlock_t *ptl;
retval = mem_container_charge(page, mm);
if (retval)
@@ -1160,6 +1160,7 @@ static int insert_page(struct mm_struct
set_pte_at(mm, addr, pte, mk_pte(page, prot));
retval = 0;
+ pte_unmap_unlock(pte, ptl);
return retval;
out_unlock:
pte_unmap_unlock(pte, ptl);
@@ -2184,8 +2185,8 @@ static int do_anonymous_page(struct mm_s
if (!page)
goto oom;
- if (mem_container_charge(page, mm))
- goto oom_free_page;
+ if (mem_container_charge(page, mm))
+ goto oom_free_page;
entry = mk_pte(page, vma->vm_page_prot);
entry = maybe_mkwrite(pte_mkdirty(entry), vma);
_
-