提交 020ee452 编写于 作者: Y yin-xiujiang 提交者: Wang ShaoBo

arm64/mpam: fix device_errcode out of bounds

kylin inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4AHUH?from=project-issue
CVE: NA

---------------------------------------------------

the size of mpam_msc_err_str is _MPAM_NUM_ERRCODE,
so device_errcode needs to be less than _MPAM_NUM_ERRCODE.
Signed-off-by: Nyin-xiujiang <yinxiujiang@kylinos.cn>
Reviewed-by: Jian Cheng <cj.chengjian(a)huawei.com>
Signed-off-by: NWang ShaoBo <bobo.shaobowang@huawei.com>
上级 d14ec468
...@@ -435,7 +435,7 @@ static irqreturn_t mpam_handle_error_irq(int irq, void *data) ...@@ -435,7 +435,7 @@ static irqreturn_t mpam_handle_error_irq(int irq, void *data)
return IRQ_NONE; return IRQ_NONE;
/* No-one expects MPAM errors! */ /* No-one expects MPAM errors! */
if (device_errcode <= _MPAM_NUM_ERRCODE) if (device_errcode < _MPAM_NUM_ERRCODE)
pr_err_ratelimited("unexpected error '%s' [esr:%x]\n", pr_err_ratelimited("unexpected error '%s' [esr:%x]\n",
mpam_msc_err_str[device_errcode], mpam_msc_err_str[device_errcode],
device_esr); device_esr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册