diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 6f36df85d23d..154d62d8ac16 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -1104,6 +1104,11 @@ skip: 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;