On Wed, 18 Dec 2013 08:42:49 +0800 Bob Liu <lliubbo@xxxxxxxxx> wrote: > This BUG_ON() was triggered when called from try_to_unmap_cluster() which > didn't lock the page. > And it's safe to mlock_vma_page() without PageLocked, so this patch fix this > issue by removing that BUG_ON() simply. > > [ 253.869145] kernel BUG at mm/mlock.c:82! > > ... > > --- a/mm/mlock.c > +++ b/mm/mlock.c > @@ -79,8 +79,6 @@ void clear_page_mlock(struct page *page) > */ > void mlock_vma_page(struct page *page) > { > - BUG_ON(!PageLocked(page)); > - > if (!TestSetPageMlocked(page)) { > mod_zone_page_state(page_zone(page), NR_MLOCK, > hpage_nr_pages(page)); The b291f000393f5a0b67901 changelog is pretty remarkable. It's not entirely clear who ended up originating this patch - either Rik or Lee. Why do we assert PAGE_Locked() in munlock_vma_page()? I agree with Vlastimil that we should remove now-unneeded lock_page()s from callers. The patch is of course worrisome. It's going to take quite some effort to review its safety and I'm disinclined to merge this into 3.13. Has this bug really been there since 2008? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>