From: Xie XiuQi <xiexiuqi(a)huawei.com>
commit 81ef5294de16ef6c8fec8a8aab509212d2240623 openEuler-1.0
hulk inclusion
category: feature
bugzilla: 5510
CVE: NA
Signed-off-by: Xie XiuQi <xiexiuqi(a)huawei.com>
Reviewed-by: Hanjun Guo <guohanjun(a)huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang(a)huawei.com>
Signed-off-by: Xin Hao <haoxing990(a)gmail.com>
---
arch/arm64/kernel/mpam_mon.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/kernel/mpam_mon.c b/arch/arm64/kernel/mpam_mon.c
index ae946b2ee681..0a3a202afc9f 100644
--- a/arch/arm64/kernel/mpam_mon.c
+++ b/arch/arm64/kernel/mpam_mon.c
@@ -64,6 +64,8 @@ int alloc_pmg(void)
void free_pmg(u32 pmg)
{
+ WARN_ON(!pmg);
+
pmg_free_map |= 1 << pmg;
}
--
2.31.0