Thread (15 messages) 15 messages, 5 authors, 2023-05-31

Re: [PATCH net] net: sched: fix NULL pointer dereference in mq_attach

From: Peilin Ye <hidden>
Date: 2023-05-29 08:59:48

On Mon, May 29, 2023 at 09:10:23AM +0800, shaozhengchao wrote:
On 2023/5/29 3:05, Jamal Hadi Salim wrote:
quoted
On Sat, May 27, 2023 at 5:30 AM Zhengchao Shao [off-list ref] wrote:
quoted
When use the following command to test:
1)ip link add bond0 type bond
2)ip link set bond0 up
3)tc qdisc add dev bond0 root handle ffff: mq
4)tc qdisc replace dev bond0 parent ffff:fff1 handle ffff: mq
This is fixed by Peilin in this ongoing discussion:
https://lore.kernel.org/netdev/cover.1684887977.git.peilin.ye@bytedance.com/ (local)
      Thank you for your reply. I have notice Peilin's patches before,
and test after the patch is incorporated in local host. But it still
triggers the problem.
      Peilin's patches can be filtered out when the query result of
qdisc_lookup is of the ingress type. Here is 4/6 patch in his patches.
+if (q->flags & TCQ_F_INGRESS) {
+     NL_SET_ERR_MSG(extack,
+                    "Cannot regraft ingress or clsact Qdiscs");
+     return -EINVAL;
+}
      However, the query result of my test case in qdisc_lookup is mq.
Therefore, the patch cannot solve my problem.
Ack, they are different: patch [4/6] prevents ingress (clsact) Qdiscs
from being regrafted (to elsewhere), and Zhengchao's patch prevents other
Qdiscs from being regrafted to ffff:fff1.

Thanks,
Peilin Ye
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help