Re: [PATCH v2] mm/rmap: fix BUG at rmap_walk

2013-12-18 Thread Sasha Levin
On 12/18/2013 11:29 PM, Wanpeng Li wrote: PageLocked is not required by page_referenced_anon() and there is not >any assertion before, commit 37f093cdf introduced this extra BUG_ON() There are two callsites shrink_active_list and page_check_references() of page_referenced(). shrink_active_list a

Re: [PATCH v2] mm/rmap: fix BUG at rmap_walk

2013-12-18 Thread Bob Liu
On Thu, Dec 19, 2013 at 11:45 AM, Wanpeng Li wrote: > page_get_anon_vma() called in page_referenced_anon() will lock and increase > the refcount of anon_vma, page won't be locked for anonymous page if the page > is not locked by the caller. This patch fix the BUG_ON by reuse referenced > field in

[PATCH v2] mm/rmap: fix BUG at rmap_walk

2013-12-18 Thread Wanpeng Li
page_get_anon_vma() called in page_referenced_anon() will lock and increase the refcount of anon_vma, page won't be locked for anonymous page if the page is not locked by the caller. This patch fix the BUG_ON by reuse referenced field in page_referenced_arg to capture locked anonymous page for