Skip to contentSkip to conversation

Patch "net: sched: cbq: create block for q->link.block" has been added to the 4.14-stable tree

PATCH [email protected] 1 participant 1 message Dec 14, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

    net: sched: cbq: create block for q->link.block

to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
net-sched-cbq-create-block-for-q-link.block.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Thu Dec 14 11:45:40 CET 2017

From: Jiri Pirko <[email protected]>
Date: Mon, 27 Nov 2017 18:37:21 +0100
Subject: net: sched: cbq: create block for q->link.block

From: Jiri Pirko <[email protected]>

[ Upstream commit d51aae68b142f48232257e96ce317db25445418d ]

q->link.block is not initialized, that leads to EINVAL when one tries to add filter there. So initialize it properly.

This can be reproduced by:

$ tc qdisc add dev eth0 root handle 1: cbq avpkt 1000 rate 1000Mbit bandwidth 1000Mbit
$ tc filter add dev eth0 parent 1: protocol ip prio 100 u32 match ip protocol 0 0x00 flowid 1:1
---
 net/sched/sch_cbq.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
net/sched/sch_cbq.c +8 -1
@@ -1157,9 +1157,13 @@ static int cbq_init(struct Qdisc *sch, s
 	if ((q->link.R_tab = qdisc_get_rtab(r, tb[TCA_CBQ_RTAB])) == NULL)
 		return -EINVAL;
 
+	err = tcf_block_get(&q->link.block, &q->link.filter_list);
+	if (err)
+		goto put_rtab;
+
 	err = qdisc_class_hash_init(&q->clhash);
 	if (err < 0)
-		goto put_rtab;
+		goto put_block;
 
 	q->link.sibling = &q->link;
 	q->link.common.classid = sch->handle;
@@ -1193,6 +1197,9 @@ static int cbq_init(struct Qdisc *sch, s
 	cbq_addprio(q, &q->link);
 	return 0;
 
+put_block:
+	tcf_block_put(q->link.block);
+
 put_rtab:
 	qdisc_put_rtab(q->link.R_tab);
 	return err;

Patches currently in stable-queue which might be from [email protected] are

queue-4.14/net-sched-cbq-create-block-for-q-link.block.patch