LSK: BUG: failure at change_huge_pmd in huge_memory.c
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro Stable Kernel (LSK) |
Fix Committed
|
High
|
Unassigned |
Bug Description
While testing LTP test suite and memory stress tests the following bug found.
Test case name: thp03
Error log:
--------------
thp02 0 TINFO : mremap 0x7f90e01000 to 0x7f8fa01000
thp02 1 TPASS : Still alive.
[ 2525.441528] BUG: failure at /home/buildslav
[ 2525.455612] Kernel panic - not syncing: BUG!
[ 2525.459900] CPU: 5 PID: 5959 Comm: thp03 Not tainted 3.10.39+ #1
[ 2525.465924] Call trace:
[ 2525.468388] [<ffffffc000087
[ 2525.473807] [<ffffffc000087
[ 2525.478879] [<ffffffc0005f3
[ 2525.483950] [<ffffffc0005ef
[ 2525.488673] [<ffffffc00016f
[ 2525.494178] [<ffffffc000156
[ 2525.500031] [<ffffffc000156
[ 2525.505534] [<ffffffc000157
[ 2525.510953] CPU0: stopping
[ 2525.513677] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.39+ #1
[ 2525.519787] Call trace:
[ 2525.522249] [<ffffffc000087
[ 2525.527667] [<ffffffc000087
[ 2525.532737] [<ffffffc0005f3
[ 2525.537808] [<ffffffc00008d
[ 2525.543050] [<ffffffc000081
[ 2525.548464] Exception stack(0xffffffc
...
Complete Error log attached to this bug and same can be found in this link.
https:/
Bug reported kernel code snippet
-------
File: mm/huge_memory.c
1479 int change_
1480 unsigned long addr, pgprot_t newprot, int prot_numa)
1481 {
1482 struct mm_struct *mm = vma->vm_mm;
1483 int ret = 0;
1484
1485 if (__pmd_
1486 pmd_t entry;
1487 entry = pmdp_get_
1488 if (!prot_numa) {
1489 entry = pmd_modify(entry, newprot);
1490 BUG_ON(
Test case description:
Test case link: http://
/*
* thp03 - Case for spliting unaligned memory.
* - System will panic if failed.
*
* Modified form a reproducer for
* https:/
* Kernel Commit id: 027ef6c87853b0a
* There was a bug in THP, will crash happened due to the following
* reason according to developers:
*
* most VM places are using pmd_none but a few are still using
* pmd_present. The meaning is about the same for the pmd. However
* pmd_present would return the wrong value on PROT_NONE ranges or in
* case of a non reproducible race with split_huge_page.
* When the code using pmd_present gets a false negative, the kernel will
* crash. It's just an annoying DoS with a BUG_ON triggering: no memory
* corruption and no data corruption (nor userland nor kernel).
*/
Linux kernel version:
-------
Linux version 3.10.39+ (buildslave@
CPU: AArch64 Processor [410fd030] revision 0
Machine: Juno
Please let know if you need more information regarding this bug
description: | updated |
Hi, /git.kernel. org/cgit/ linux/kernel/ git/torvalds/ linux.git/ commit/ ?id=44b6dfc5568 11c0e6981329e29 e1865fc7a8847d
Could you please merge the following:
https:/
and, /git.kernel. org/cgit/ linux/kernel/ git/torvalds/ linux.git/ commit/ ?id=c2c93e5b7f3 f42277ec25ff374 6096abc0c0d0f7
https:/
Thanks,
--
Steve