Wang ShaoBo (2): arm64/mpam: Fix uninitialized symbol ret arm64/mpam: Fix buffer overflow in mpam_handle_error_irq()
arch/arm64/kernel/mpam/mpam_ctrlmon.c | 2 +- arch/arm64/kernel/mpam/mpam_device.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
From: Wang ShaoBo bobo.shaobowang@huawei.com
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8EF0Z
--------------------------------
This fix compile error:
arch/arm64/kernel/mpam/mpam_ctrlmon.c:793 resctrl_mkdir_mondata_all_subdir() error: uninitialized symbol 'ret'.
Fixes: 037915d24c0a ("arm64/mpam: resctrl: Remove ctrlmon sysfile") Signed-off-by: Wang ShaoBo bobo.shaobowang@huawei.com Signed-off-by: Jialin Zhang zhangjialin11@huawei.com --- arch/arm64/kernel/mpam/mpam_ctrlmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/mpam/mpam_ctrlmon.c b/arch/arm64/kernel/mpam/mpam_ctrlmon.c index 8abbf2823269..7a0fec297856 100644 --- a/arch/arm64/kernel/mpam/mpam_ctrlmon.c +++ b/arch/arm64/kernel/mpam/mpam_ctrlmon.c @@ -769,7 +769,7 @@ int resctrl_mkdir_mondata_all_subdir(struct kernfs_node *parent_kn, { struct resctrl_schema *s; struct resctrl_resource *r; - int ret; + int ret = 0;
/* * Create the subdirectories for each domain. Note that all events
From: Wang ShaoBo bobo.shaobowang@huawei.com
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8EF0Z
--------------------------------
Fix buffer overflow in mpam_handle_error_irq(): mpam_handle_error_irq() error: buffer overflow 'mpam_msc_err_str' 8 <= 8
Fixes: 44513976e11e ("arm64/mpam: Enabling registering and logging error interrupts") Signed-off-by: Wang ShaoBo bobo.shaobowang@huawei.com Signed-off-by: Jialin Zhang zhangjialin11@huawei.com --- arch/arm64/kernel/mpam/mpam_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/mpam/mpam_device.c b/arch/arm64/kernel/mpam/mpam_device.c index b3de7f518423..19c49f76d0e5 100644 --- a/arch/arm64/kernel/mpam/mpam_device.c +++ b/arch/arm64/kernel/mpam/mpam_device.c @@ -439,7 +439,7 @@ static irqreturn_t mpam_handle_error_irq(int irq, void *data) return IRQ_NONE;
/* 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", mpam_msc_err_str[device_errcode], device_esr);
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/3109 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/Q...
FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/3109 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/Q...