From: Dmitry Vyukov <dvyukov@google.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Vlastimil Babka <vbabka@suse.cz>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>,
Konstantin Khlebnikov <koct9i@gmail.com>,
Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: syzkaller <syzkaller@googlegroups.com>
Subject: mm: BUG in munlock_vma_pages_range
Date: Tue, 15 Nov 2016 05:47:26 +0100 [thread overview]
Message-ID: <CACT4Y+ZKGtDQ=jO95tMrzR=-8r5vpZqgE9DNTW8vdmckM+NhYw@mail.gmail.com> (raw)
Hello,
The following program triggers BUG in munlock_vma_pages_range:
// autogenerated by syzkaller (http://github.com/google/syzkaller)
#include <sys/mman.h>
int main()
{
mmap((void*)0x20105000ul, 0xc00000ul, 0x2ul, 0x2172ul, -1, 0);
mremap((void*)0x201fd000ul, 0x4000ul, 0xc00000ul, 0x3ul, 0x203f0000ul);
return 0;
}
page:ffffea0001847cc0 count:0 mapcount:1 mapping:dead000000000400
index:0x20400 compound_mapcount: 1
flags: 0x5fffc0000000000()
page dumped because: VM_BUG_ON_PAGE(PageMlocked(page))
------------[ cut here ]------------
kernel BUG at mm/mlock.c:460!
invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN
Modules linked in:
CPU: 2 PID: 6526 Comm: a.out Not tainted 4.9.0-rc5+ #28
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
task: ffff8800681ca0c0 task.stack: ffff8800637f0000
RIP: 0010:[<ffffffff81965272>] [<ffffffff81965272>]
munlock_vma_pages_range+0xcc2/0x1010 mm/mlock.c:460
RSP: 0018:ffff8800637f7178 EFLAGS: 00010292
RAX: 0000000000000000 RBX: ffffea0001847cc0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffff88006d016e08 RDI: ffffed000c6fee20
RBP: ffff8800637f7638 R08: 0000000000000001 R09: 0000000000000000
R10: dffffc0000000000 R11: 0000000000000001 R12: ffffea0001847ce0
R13: ffffea0001840000 R14: dffffc0000000000 R15: ffff8800637f7610
FS: 0000000000000000(0000) GS:ffff88006d000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004b2080 CR3: 0000000064f87000 CR4: 00000000000006e0
Stack:
0000000041b58ab3 ffffffff894cfa90 ffff8800637f74f0 ffff8800637f7578
0000000000000005 ffff88007fff8000 1ffff1000c6fee42 ffff8800637f74b0
0000000020400000 000000050c6fee41 ffffea000196c55c ffffed000c6feeaf
Call Trace:
[< inline >] munlock_vma_pages_all mm/internal.h:277
[<ffffffff8197261b>] exit_mmap+0x1bb/0x4e0 mm/mmap.c:2924
[< inline >] __mmput kernel/fork.c:866
[<ffffffff813f24ce>] mmput+0x20e/0x4c0 kernel/fork.c:888
[< inline >] exit_mm kernel/exit.c:512
[<ffffffff814119a0>] do_exit+0x960/0x2640 kernel/exit.c:815
[<ffffffff8141383e>] do_group_exit+0x14e/0x420 kernel/exit.c:931
[< inline >] SYSC_exit_group kernel/exit.c:942
[<ffffffff81413b32>] SyS_exit_group+0x22/0x30 kernel/exit.c:940
[<ffffffff88143885>] entry_SYSCALL_64_fastpath+0x23/0xc6
arch/x86/entry/entry_64.S:209
Code: 0b e8 53 2e d8 ff 48 c7 c6 c0 32 31 88 48 89 df e8 54 2e fd ff
0f 0b e8 3d 2e d8 ff 48 c7 c6 80 35 31 88 48 89 df e8 3e 2e fd ff <0f>
0b 48 89 85 a8 fb ff ff e8 20 2e d8 ff 48 8b 85 a8 fb ff ff
RIP [<ffffffff81965272>] munlock_vma_pages_range+0xcc2/0x1010 mm/mlock.c:460
RSP <ffff8800637f7178>
---[ end trace 694dc6462f524cf9 ]---
Fixing recursive fault but reboot is needed!
On commit a25f0944ba9b1d8a6813fd6f1a86f1bd59ac25a6 (Nov 13).
--
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 reply other threads:[~2016-11-15 4:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-15 4:47 Dmitry Vyukov [this message]
2016-11-15 13:27 ` Kirill A. Shutemov
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='CACT4Y+ZKGtDQ=jO95tMrzR=-8r5vpZqgE9DNTW8vdmckM+NhYw@mail.gmail.com' \
--to=dvyukov@google.com \
--cc=akpm@linux-foundation.org \
--cc=aryabinin@virtuozzo.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=koct9i@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=syzkaller@googlegroups.com \
--cc=vbabka@suse.cz \
/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