diff options
author | Patrick McHardy <kaber@trash.net> | 2009-09-09 18:11:23 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-09 18:11:23 -0700 |
commit | 23bcf634c8bc0d84607a5b863333191d58baee4c (patch) | |
tree | bc988ab6230bebf47e1dc22db70f94901ac2eeb5 /include/net | |
parent | ea6a634ef7f0ab1d1f48ba0ad4f50e96d6065312 (diff) |
net_sched: fix estimator lock selection for mq child qdiscs
When new child qdiscs are attached to the mq qdisc, they are actually
attached as root qdiscs to the device queues. The lock selection for
new estimators incorrectly picks the root lock of the existing and
to be replaced qdisc, which results in a use-after-free once the old
qdisc has been destroyed.
Mark mq qdisc instances with a new flag and treat qdiscs attached to
mq as children similar to regular root qdiscs.
Additionally prevent estimators from being attached to the mq qdisc
itself since it only updates its byte and packet counters during dumps.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/sch_generic.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 9c69585a1be8..88eb9de095de 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -46,6 +46,7 @@ struct Qdisc #define TCQ_F_THROTTLED 2 #define TCQ_F_INGRESS 4 #define TCQ_F_CAN_BYPASS 8 +#define TCQ_F_MQROOT 16 #define TCQ_F_WARN_NONWC (1 << 16) int padded; struct Qdisc_ops *ops; |