From: Andrew Morton <akpm@linux-foundation.org>
To: Bob Liu <lliubbo@gmail.com>
Cc: linux-mm@kvack.org, walken@google.com,
kosaki.motohiro@jp.fujitsu.com, riel@redhat.com,
sasha.levin@oracle.com, vbabka@suse.cz, stable@kernel.org,
gregkh@linuxfoundation.org, Bob Liu <bob.liu@oracle.com>
Subject: Re: [PATCH] mm: remove BUG_ON() from mlock_vma_page()
Date: Wed, 18 Dec 2013 14:30:33 -0800 [thread overview]
Message-ID: <20131218143033.481361914129a68b74ec7e9d@linux-foundation.org> (raw)
In-Reply-To: <1387327369-18806-1-git-send-email-bob.liu@oracle.com>
On Wed, 18 Dec 2013 08:42:49 +0800 Bob Liu <lliubbo@gmail.com> 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@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2013-12-18 22:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-18 0:42 Bob Liu
2013-12-18 9:36 ` Vlastimil Babka
2013-12-18 10:26 ` Bob Liu
2013-12-18 19:31 ` Motohiro Kosaki
2013-12-18 22:30 ` Andrew Morton [this message]
2014-01-31 20:33 ` Andrew Morton
2014-02-23 19:32 ` Sasha Levin
2014-02-24 17:57 ` Motohiro Kosaki
2014-03-03 16:12 ` Vlastimil Babka
2014-03-11 18:43 ` Dave Jones
2014-03-20 9:18 ` Bob Liu
2014-03-20 10:36 ` Vlastimil Babka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131218143033.481361914129a68b74ec7e9d@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=bob.liu@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=lliubbo@gmail.com \
--cc=riel@redhat.com \
--cc=sasha.levin@oracle.com \
--cc=stable@kernel.org \
--cc=vbabka@suse.cz \
--cc=walken@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox