From 81ef5294de16ef6c8fec8a8aab509212d2240623 Mon Sep 17 00:00:00 2001 From: Xie XiuQi Date: Tue, 29 Jan 2019 17:38:38 +0800 Subject: [PATCH] arm64/mpam: mon: add WARN_ON for debug free_pmg hulk inclusion category: feature bugzilla: 5510 CVE: NA Signed-off-by: Xie XiuQi Reviewed-by: Hanjun Guo Signed-off-by: Yang Yingliang --- 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; } -- GitLab