]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net_sched: check cops->tcf_block in tc_bind_tclass()
authorCong Wang <xiyou.wangcong@gmail.com>
Sun, 8 Sep 2019 19:11:23 +0000 (12:11 -0700)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 16 Oct 2019 09:55:36 +0000 (11:55 +0200)
commit6ce779e8f9daed284e75b88a9754d32de76189c4
treeeb27deeb2f915b34ee7dd5829579726750d7fbea
parent889d770087a3fe065048ecbdc6471acd72856af7
net_sched: check cops->tcf_block in tc_bind_tclass()

BugLink: https://bugs.launchpad.net/bugs/1847155
[ Upstream commit 8b142a00edcf8422ca48b8de88d286efb500cb53 ]

At least sch_red and sch_tbf don't implement ->tcf_block()
while still have a non-zero tc "class".

Instead of adding nop implementations to each of such qdisc's,
we can just relax the check of cops->tcf_block() in
tc_bind_tclass(). They don't support TC filter anyway.

Reported-by: syzbot+21b29db13c065852f64b@syzkaller.appspotmail.com
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
net/sched/sch_api.c