diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 4a27dfb1ba0faab3692a82969fb8b78768742779..c82532e2069922a4c8918c75bfa509c2c5db6a65 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -1132,6 +1132,11 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, return -ENOENT; } + if (new && new->ops == &noqueue_qdisc_ops) { + NL_SET_ERR_MSG(extack, "Cannot assign noqueue to a class"); + return -EINVAL; + } + err = cops->graft(parent, cl, new, &old, extack); if (err) return err;