[<prev] [next>] [day] [month] [year] [list]
Message-ID: <96e9b733d9360f207d3aeeff6fb571bd1ceb2b3b.camel@mediatek.com>
Date: Thu, 1 Jun 2023 09:27:49 +0000
From: John Hsu (許永翰) <John.Hsu@...iatek.com>
To: "maple-tree@...ts.infradead.org" <maple-tree@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>
CC: Andrew Yang (楊智強)
<Andrew.Yang@...iatek.com>,
"liam.howlett@...cle.com" <liam.howlett@...cle.com>,
Qun-wei Lin (林群崴)
<Qun-wei.Lin@...iatek.com>,
Chinwen Chang (張錦文)
<chinwen.chang@...iatek.com>,
Kuan-Ying Lee (李冠穎)
<Kuan-Ying.Lee@...iatek.com>,
Casper Li (李中榮) <casper.li@...iatek.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"yuzhao@...gle.com" <yuzhao@...gle.com>,
John Hsu (許永翰) <John.Hsu@...iatek.com>
Subject: [BUG] trigger BUG_ON in mas_store_prealloc when low memory
Hi,
We met BUG_ON in mas_store_prealloc with kernel-6.1 stress testing
environment .
According to coredump, BUG_ON is triggered by mas->node with error
number -ENOMEM(0xffffffffffffffd2).
There are some mas_node_count functions in mas_wr_store_entry, and it
seems that mas->node may be set to error node with -ENOMEM if there was
no enough memory spcace for maple tree operations.
We think that return -ENOMEM instead of directly triggering BUG_ON when
memory is not available is suitable, because in reality the tree
operation shouldn't be performed in this situation.
following are the backtrace
mas_store_prealloc+0x23c/0x484
vma_mas_store+0xe4/0x2d0
__vma_adjust+0xab0/0x1470
vma_merge+0x5b8/0x5d4
mprotect_fixup+0x1f4/0x478
__arm64_sys_mprotect+0x6b0/0x8f0
invoke_syscall+0x84/0x264
el0_svc_common+0x118/0x1f0
do_el0_svc+0x5c/0x184
el0_svc+0x38/0x98
Any suggestion is appreciated.
Thank you.
BRs,
John Hsu
Powered by blists - more mailing lists