From 41065fba846e795b31b17e4dec01cb904d56c6cd Mon Sep 17 00:00:00 2001 From: Jarek Poplawski Date: Tue, 10 Aug 2010 22:31:02 +0000 Subject: pkt_sched: Fix sch_sfq vs tc_modify_qdisc oops sch_sfq as a classful qdisc needs the .leaf handler. Otherwise, there is an oops possible in tc_modify_qdisc()/check_loop(). Fixes commit 7d2681a6ff4f9ab5e48d02550b4c6338f1638998 Signed-off-by: Jarek Poplawski Signed-off-by: David S. Miller --- net/sched/sch_sfq.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'net') diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index b8bcb20..201cbac 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c @@ -508,6 +508,11 @@ nla_put_failure: 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; @@ -575,6 +580,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, .put = sfq_put, .tcf_chain = sfq_find_tcf, -- cgit v1.1