diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 6e18aa41778285e7fa97e606f46cfc67e0f03236..01bec5e746d3c8c0dfe499c84b5ac1c9571c5be7 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -1113,6 +1113,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;