All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sasha.levin@oracle.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: vbabka@suse.cz, joern@logfs.org, mgorman@suse.de,
	Michel Lespinasse <walken@google.com>,
	riel@redhat.com, LKML <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: kernel BUG in munlock_vma_pages_range
Date: Sat, 07 Dec 2013 20:52:03 -0500	[thread overview]
Message-ID: <52A3D0C3.1080504@oracle.com> (raw)

Hi all,

While fuzzing with trinity inside a KVM tools guest running latest -next kernel,
I've stumbled on the following spew.

The code seems to be in munlock_vma_pages_range():

         page = follow_page_mask(vma, start, FOLL_GET | FOLL_DUMP,
                         &page_mask);

         if (page && !IS_ERR(page)) {
                 if (PageTransHuge(page)) {		<<==== HERE
                         lock_page(page);


This is new code added in "mm: munlock: batch non-THP page isolation and munlock+putback
using pagevec". I've Cc'ed involved parties.

[  356.390309] kernel BUG at include/linux/page-flags.h:415!
[  356.390309] invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
[  356.395160] Dumping ftrace buffer:
[  356.395160]    (ftrace buffer empty)
[  356.395160] Modules linked in:
[  356.395160] CPU: 36 PID: 10919 Comm: trinity-child74 Not tainted 
3.13.0-rc2-next-20131206-sasha-00005-g8be2375-dirty #4045
[  356.395160] task: ffff880f731e0000 ti: ffff880f731e8000 task.ti: ffff880f731e8000
[  356.395160] RIP: 0010:[<ffffffff812636c9>]  [<ffffffff812636c9>] munlock_vma_pages_range+0x89/0x1b0
[  356.395160] RSP: 0018:ffff880f731e9b58  EFLAGS: 00010286
[  356.395160] RAX: 002fffff80008000 RBX: 00007f91cd801000 RCX: 0000000000000000
[  356.395160] RDX: ffffea003ded0040 RSI: 00000000000013f1 RDI: 00000000ffffffff
[  356.395160] RBP: ffff880f731e9c18 R08: 00000000e26e4584 R09: 0000000000000001
[  356.395160] R10: 0000000000000001 R11: 0000000000000000 R12: ffffea003ded0040
[  356.395160] R13: ffff880f733a8400 R14: 00007f91cdeea000 R15: ffff880f731e9be4
[  356.395160] FS:  0000000000000000(0000) GS:ffff880fdba00000(0000) knlGS:0000000000000000
[  356.395160] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  356.395160] CR2: 0000000000000000 CR3: 0000000f7314a000 CR4: 00000000000006e0
[  356.395160] Stack:
[  356.395160]  0000000000000000 0000000000000000 0000000000000000 0000000000000000
[  356.395160]  0000000000000000 0000000000000000 0000000000000000 0000000000000000
[  356.395160]  0000000000000000 0000000000000000 0000000000000000 0000000000000000
[  356.395160] Call Trace:
[  356.395160]  [<ffffffff81264c89>] exit_mmap+0x59/0x170
[  356.395160]  [<ffffffff8129a4a0>] ? __khugepaged_exit+0xe0/0x150
[  356.395160]  [<ffffffff81292d2b>] ? kmem_cache_free+0x24b/0x310
[  356.395160]  [<ffffffff8129a4a0>] ? __khugepaged_exit+0xe0/0x150
[  356.395160]  [<ffffffff81127eec>] mmput+0x7c/0xf0
[  356.395160]  [<ffffffff8112c18d>] exit_mm+0x18d/0x1a0
[  356.395160]  [<ffffffff811c8d85>] ? acct_collect+0x175/0x1b0
[  356.395160]  [<ffffffff8112ceef>] do_exit+0x26f/0x4e0
[  356.395160]  [<ffffffff8112d209>] do_group_exit+0xa9/0xe0
[  356.395160]  [<ffffffff81311ff0>] get_signal_to_deliver+0x460/0x4b0
[  356.395160]  [<ffffffff81067c3b>] do_signal+0x4b/0x120
[  356.395160]  [<ffffffff842a4405>] ? _raw_spin_unlock+0x35/0x60
[  356.395160]  [<ffffffff81168d36>] ? vtime_account_user+0x96/0xb0
[  356.395160]  [<ffffffff8122ccbf>] ? context_tracking_user_exit+0xaf/0x160
[  356.395160]  [<ffffffff81067f9a>] do_notify_resume+0x5a/0xe0
[  356.395160]  [<ffffffff842ad0f0>] int_signal+0x12/0x17
[  356.395160] Code: 48 89 de 4c 89 ef e8 17 7f ff ff 49 89 c4 48 85 c0 0f 84 eb 00 00 00 48 3d 00 
f0 ff ff 0f 87 df 00 00 00 48 8b 00 66 85 c0 79 0f <0f> 0b 0f 1f 44 00 00 eb fe 66 0f 1f 44 00 00 49 
8b 04 24 f6 c4
[  356.395160] RIP  [<ffffffff812636c9>] munlock_vma_pages_range+0x89/0x1b0
[  356.395160]  RSP <ffff880f731e9b58>

--
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>

WARNING: multiple messages have this Message-ID (diff)
From: Sasha Levin <sasha.levin@oracle.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: vbabka@suse.cz, joern@logfs.org, mgorman@suse.de,
	Michel Lespinasse <walken@google.com>,
	riel@redhat.com, LKML <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: kernel BUG in munlock_vma_pages_range
Date: Sat, 07 Dec 2013 20:52:03 -0500	[thread overview]
Message-ID: <52A3D0C3.1080504@oracle.com> (raw)

Hi all,

While fuzzing with trinity inside a KVM tools guest running latest -next kernel,
I've stumbled on the following spew.

The code seems to be in munlock_vma_pages_range():

         page = follow_page_mask(vma, start, FOLL_GET | FOLL_DUMP,
                         &page_mask);

         if (page && !IS_ERR(page)) {
                 if (PageTransHuge(page)) {		<<==== HERE
                         lock_page(page);


This is new code added in "mm: munlock: batch non-THP page isolation and munlock+putback
using pagevec". I've Cc'ed involved parties.

[  356.390309] kernel BUG at include/linux/page-flags.h:415!
[  356.390309] invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
[  356.395160] Dumping ftrace buffer:
[  356.395160]    (ftrace buffer empty)
[  356.395160] Modules linked in:
[  356.395160] CPU: 36 PID: 10919 Comm: trinity-child74 Not tainted 
3.13.0-rc2-next-20131206-sasha-00005-g8be2375-dirty #4045
[  356.395160] task: ffff880f731e0000 ti: ffff880f731e8000 task.ti: ffff880f731e8000
[  356.395160] RIP: 0010:[<ffffffff812636c9>]  [<ffffffff812636c9>] munlock_vma_pages_range+0x89/0x1b0
[  356.395160] RSP: 0018:ffff880f731e9b58  EFLAGS: 00010286
[  356.395160] RAX: 002fffff80008000 RBX: 00007f91cd801000 RCX: 0000000000000000
[  356.395160] RDX: ffffea003ded0040 RSI: 00000000000013f1 RDI: 00000000ffffffff
[  356.395160] RBP: ffff880f731e9c18 R08: 00000000e26e4584 R09: 0000000000000001
[  356.395160] R10: 0000000000000001 R11: 0000000000000000 R12: ffffea003ded0040
[  356.395160] R13: ffff880f733a8400 R14: 00007f91cdeea000 R15: ffff880f731e9be4
[  356.395160] FS:  0000000000000000(0000) GS:ffff880fdba00000(0000) knlGS:0000000000000000
[  356.395160] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  356.395160] CR2: 0000000000000000 CR3: 0000000f7314a000 CR4: 00000000000006e0
[  356.395160] Stack:
[  356.395160]  0000000000000000 0000000000000000 0000000000000000 0000000000000000
[  356.395160]  0000000000000000 0000000000000000 0000000000000000 0000000000000000
[  356.395160]  0000000000000000 0000000000000000 0000000000000000 0000000000000000
[  356.395160] Call Trace:
[  356.395160]  [<ffffffff81264c89>] exit_mmap+0x59/0x170
[  356.395160]  [<ffffffff8129a4a0>] ? __khugepaged_exit+0xe0/0x150
[  356.395160]  [<ffffffff81292d2b>] ? kmem_cache_free+0x24b/0x310
[  356.395160]  [<ffffffff8129a4a0>] ? __khugepaged_exit+0xe0/0x150
[  356.395160]  [<ffffffff81127eec>] mmput+0x7c/0xf0
[  356.395160]  [<ffffffff8112c18d>] exit_mm+0x18d/0x1a0
[  356.395160]  [<ffffffff811c8d85>] ? acct_collect+0x175/0x1b0
[  356.395160]  [<ffffffff8112ceef>] do_exit+0x26f/0x4e0
[  356.395160]  [<ffffffff8112d209>] do_group_exit+0xa9/0xe0
[  356.395160]  [<ffffffff81311ff0>] get_signal_to_deliver+0x460/0x4b0
[  356.395160]  [<ffffffff81067c3b>] do_signal+0x4b/0x120
[  356.395160]  [<ffffffff842a4405>] ? _raw_spin_unlock+0x35/0x60
[  356.395160]  [<ffffffff81168d36>] ? vtime_account_user+0x96/0xb0
[  356.395160]  [<ffffffff8122ccbf>] ? context_tracking_user_exit+0xaf/0x160
[  356.395160]  [<ffffffff81067f9a>] do_notify_resume+0x5a/0xe0
[  356.395160]  [<ffffffff842ad0f0>] int_signal+0x12/0x17
[  356.395160] Code: 48 89 de 4c 89 ef e8 17 7f ff ff 49 89 c4 48 85 c0 0f 84 eb 00 00 00 48 3d 00 
f0 ff ff 0f 87 df 00 00 00 48 8b 00 66 85 c0 79 0f <0f> 0b 0f 1f 44 00 00 eb fe 66 0f 1f 44 00 00 49 
8b 04 24 f6 c4
[  356.395160] RIP  [<ffffffff812636c9>] munlock_vma_pages_range+0x89/0x1b0
[  356.395160]  RSP <ffff880f731e9b58>

             reply	other threads:[~2013-12-08  2:02 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-08  1:52 Sasha Levin [this message]
2013-12-08  1:52 ` kernel BUG in munlock_vma_pages_range Sasha Levin
2013-12-09  9:34 ` Vlastimil Babka
2013-12-09  9:34   ` Vlastimil Babka
2013-12-09 17:05   ` Sasha Levin
2013-12-09 17:05     ` Sasha Levin
2013-12-09 17:12     ` Vlastimil Babka
2013-12-09 17:12       ` Vlastimil Babka
2013-12-09 17:15       ` Sasha Levin
2013-12-09 20:26       ` Sasha Levin
2013-12-09 20:26         ` Sasha Levin
2013-12-11 22:59         ` Vlastimil Babka
2013-12-11 22:59           ` Vlastimil Babka
2013-12-12  3:16           ` Sasha Levin
2013-12-12  3:16             ` Sasha Levin
2013-12-12  5:03             ` Bob Liu
2013-12-12  5:03               ` Bob Liu
2013-12-12 12:41               ` Vlastimil Babka
2013-12-12 12:41                 ` Vlastimil Babka
2013-12-12 21:05                 ` Sasha Levin
2013-12-12 21:05                   ` Sasha Levin
2013-12-13  8:49                   ` Bob Liu
2013-12-13  8:49                     ` Bob Liu
2013-12-13  9:08                     ` Vlastimil Babka
2013-12-13  9:08                       ` Vlastimil Babka
2013-12-15 19:49                       ` Sasha Levin
2013-12-15 19:49                         ` Sasha Levin
2013-12-16 10:14                         ` [PATCH 0/3] Fix bugs in munlock Vlastimil Babka
2013-12-16 10:14                           ` Vlastimil Babka
2013-12-16 10:14                           ` [PATCH 1/3] mm: munlock: fix a bug where THP tail page is encountered Vlastimil Babka
2013-12-16 10:14                             ` Vlastimil Babka
2013-12-17  1:26                             ` Bob Liu
2013-12-17  1:26                               ` Bob Liu
2013-12-17 13:00                               ` Vlastimil Babka
2013-12-17 13:00                                 ` Vlastimil Babka
2013-12-18  0:48                                 ` Bob Liu
2013-12-18  0:48                                   ` Bob Liu
2014-03-14 23:55                                 ` Sasha Levin
2014-03-14 23:55                                   ` Sasha Levin
2014-03-15  3:06                                   ` Sasha Levin
2014-03-15  3:06                                     ` Sasha Levin
2014-03-17 12:38                                     ` Vlastimil Babka
2014-03-17 12:38                                       ` Vlastimil Babka
2014-03-17 21:08                                       ` Sasha Levin
2014-03-17 21:08                                         ` Sasha Levin
2014-03-17 22:20                                         ` Vlastimil Babka
2014-03-17 22:20                                           ` Vlastimil Babka
2014-03-17 22:58                                           ` Sasha Levin
2014-03-17 22:58                                             ` Sasha Levin
2014-03-17 23:30                                             ` Vlastimil Babka
2014-03-17 23:30                                               ` Vlastimil Babka
2014-03-18 10:41                                             ` Vlastimil Babka
2014-03-18 10:41                                               ` Vlastimil Babka
2013-12-16 10:14                           ` [PATCH 2/3] mm: munlock: fix deadlock in __munlock_pagevec() Vlastimil Babka
2013-12-16 10:14                             ` Vlastimil Babka
2013-12-17  0:31                             ` Andrew Morton
2013-12-17  0:31                               ` Andrew Morton
2013-12-17 13:08                               ` Vlastimil Babka
2013-12-17 13:08                                 ` Vlastimil Babka
2013-12-16 10:14                           ` [RFC PATCH 3/3] mm: munlock: fix potential race with THP page split Vlastimil Babka
2013-12-16 10:14                             ` Vlastimil Babka
2014-03-21  1:53                       ` kernel BUG in munlock_vma_pages_range Sasha Levin
2014-03-21  1:53                         ` Sasha Levin
2014-03-21  9:02                         ` Vlastimil Babka
2014-03-21  9:02                           ` Vlastimil Babka
2013-12-09 21:16     ` Jiri Kosina
2013-12-09 21:16       ` Jiri Kosina
2013-12-11 15:55       ` Sasha Levin
2013-12-11 15:55         ` Sasha Levin

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=52A3D0C3.1080504@oracle.com \
    --to=sasha.levin@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=joern@logfs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=riel@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.