diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 2317db02c764d29f9b0fa561a7d3ef08816fe461..72d2c204d5f340eb3905ba98bc0cf6ed1415d80e 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -1133,6 +1133,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;