diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c index f192618480871c6f50f01016f8481ed318ca7c39..6a4ed0d6e5ccc686f88427108cd0a23bc489168b 100644 --- a/net/sched/sch_dsmark.c +++ b/net/sched/sch_dsmark.c @@ -358,6 +358,8 @@ static int dsmark_init(struct Qdisc *sch, struct nlattr *opt, goto errout; err = -EINVAL; + if (!tb[TCA_DSMARK_INDICES]) + goto errout; indices = nla_get_u16(tb[TCA_DSMARK_INDICES]); if (hweight32(indices) != 1)