]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: fix tc_u_common lookup
authorJiri Pirko <jiri@mellanox.com>
Tue, 13 Feb 2018 11:00:17 +0000 (12:00 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Feb 2018 17:29:02 +0000 (12:29 -0500)
commit57215c06e5788f50908e92159637416d16587f60
tree1c8eebd7b5da3e11d1374fe328dc4c254f47d4be
parentb29664d0f5be8602d995f6a36da666b6d7028a31
net: sched: fix tc_u_common lookup

The offending commit wrongly assumes 1:1 mapping between block and q.
However, there are multiple blocks for a single q for classful qdiscs.
Since the obscure tc_u_common sharing mechanism expects it to be shared
among a qdisc, fix it by storing q pointer in case the block is not
shared.

Reported-by: Paweł Staszewski <pstaszewski@itcare.pl>
Reported-by: Cong Wang <xiyou.wangcong@gmail.com>
Fixes: 21e05af7079b ("net: sched: cls_u32: use block instead of q in tc_u_common")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_u32.c