hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IATU6E CVE: NA
--------------------------------
If req->tx_pid == req->tx_pid when sched_net_relationship_submit() called, which cause rship->net_lock AA deadlock in task_net_group().
Fixes: 2ac826b258e9 ("sched: Introduce task relationship by net and memory") Signed-off-by: Hui Tang tanghui20@huawei.com --- kernel/sched/relationship.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/kernel/sched/relationship.c b/kernel/sched/relationship.c index 515c913aeb33..d17041585c39 100644 --- a/kernel/sched/relationship.c +++ b/kernel/sched/relationship.c @@ -141,6 +141,9 @@ int sched_net_relationship_submit(struct net_relationship_req *req) req->net_rship_type == NET_RS_TYPE_TX) return remote_rxtx_process(req);
+ if (req->rx_pid == req->tx_pid) + return -EINVAL; + rcu_read_lock();
rx_tsk = find_task_by_pid_ns(req->rx_pid, &init_pid_ns);
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/11914 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/Y...
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/11914 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/Y...