
From: Tang Yizhou <tangyizhou@huawei.com> ascend inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4EUVI CVE: NA ------------------------------------------------- Increase the value of sp_stat_sem when failed. Signed-off-by: Tang Yizhou <tangyizhou@huawei.com> Reviewed-by: Ding Tianhong <dingtianhong@huawei.com> Reviewed-by: Weilong Chen <chenweilong@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- mm/share_pool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/share_pool.c b/mm/share_pool.c index ebc2d04c01145..607a5f0097a41 100644 --- a/mm/share_pool.c +++ b/mm/share_pool.c @@ -135,6 +135,7 @@ static struct sp_proc_stat *sp_init_proc_stat(struct task_struct *tsk, up_write(&sp_stat_sem); return stat; } else { + up_write(&sp_stat_sem); /* if enter this branch, that's our mistake */ pr_err_ratelimited("share pool: proc stat invalid id %d\n", id); return ERR_PTR(-EBUSY); -- 2.25.1