提交 875918c3 编写于 作者: A4D's avatar A4D 提交者: Zheng Zengkai

arm64/mpam: fix a possible deadlock in mpam_enable

hulk inclusion
category: bugfix
bugzilla: 51497
CVE: NA
Reference: https://gitee.com/openeuler/kernel/issues/I3D58V

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

No unlock operation is performed on the mpam_devices_lock
before the return statement, which may lead to a deadlock.

Signed-off-by: Zhang Ming <154842638(a)qq.com>
Reported-by: Jian Cheng <cj.chengjian(a)huawei.com>
Suggested-by: Jian Cheng <cj.chengjian(a)huawei.com>
Reviewed-by: Wang ShaoBo<bobo.shaobowang(a)huawei.com>
Reviewed-by: Xie XiuQi <xiexiuqi(a)huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 1e52616c
......@@ -560,8 +560,10 @@ static void __init mpam_enable(struct work_struct *work)
mutex_lock(&mpam_devices_lock);
mpam_enable_squash_features();
err = mpam_allocate_config();
if (err)
if (err) {
mutex_unlock(&mpam_devices_lock);
return;
}
mutex_unlock(&mpam_devices_lock);
mpam_enable_irqs();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册