*** BLURB HERE ***
Chen Ridong (1): cgroup/cpuset: fix general protection fault in update_cpumask
kernel/cgroup/cpuset.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9N7NY
----------------------------------------------------------------------
In alloc_cpumasks, pmask4 may be null if cs is null, so it may lead to null pointer reference. Just make sure pmask4 is not null before assessing it.
Fix: 1e0b07acf6561("cgroup/cpuset: Add cpuset.cpus.exclusive for v2") Signed-off-by: Chen Ridong chenridong@huawei.com --- kernel/cgroup/cpuset.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index 53d2917a798c..d600566fb8e3 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -675,7 +675,8 @@ static inline int alloc_cpumasks(struct cpuset *cs, struct tmpmasks *tmp)
#ifdef CONFIG_QOS_SCHED_DYNAMIC_AFFINITY free_four: - free_cpumask_var(*pmask4); + if (pmask4) + free_cpumask_var(*pmask4); #endif free_three: free_cpumask_var(*pmask3);
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/6910 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/3...
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/6910 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/3...