]> www.infradead.org Git - users/dwmw2/linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Oct 2019 07:01:45 +0000 (09:01 +0200)
commit719532b9b83211febd34a1a5b1aa28c5469a0697
tree328a218bf1a14663e980c92498986563176c17b7
parentbd740eacb1d2034331cc5ec48e73fe45c6a06d85
net_sched: check cops->tcf_block in tc_bind_tclass()

[ 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>
net/sched/sch_api.c