Commit 34793c34 authored by Jarek Poplawski's avatar Jarek Poplawski Committed by Greg Kroah-Hartman

pkt_sched: Fix sch_sfq vs tc_modify_qdisc oops

[ Upstream commit 41065fba ]

sch_sfq as a classful qdisc needs the .leaf handler. Otherwise, there
is an oops possible in tc_modify_qdisc()/check_loop().

Fixes commit 7d2681a6Signed-off-by: default avatarJarek Poplawski <jarkao2@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0ff3da3b
......@@ -497,6 +497,11 @@ static int sfq_dump(struct Qdisc *sch, struct sk_buff *skb)
return -1;
}
static struct Qdisc *sfq_leaf(struct Qdisc *sch, unsigned long arg)
{
return NULL;
}
static unsigned long sfq_get(struct Qdisc *sch, u32 classid)
{
return 0;
......@@ -560,6 +565,7 @@ static void sfq_walk(struct Qdisc *sch, struct qdisc_walker *arg)
}
static const struct Qdisc_class_ops sfq_class_ops = {
.leaf = sfq_leaf,
.get = sfq_get,
.tcf_chain = sfq_find_tcf,
.bind_tcf = sfq_bind,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment